Jump to content
Latest News: (loading..)


Popular Content

Showing most liked content on 12/11/2017 in all areas

  1. 1 point

    Build a LAMP Stack for OSC

    Just had to bring up another Centos 7 LAMP stack DO Droplet. I extracted these notes from my bash and mysql history. I have done these on both the AWS and DO and they are the same...hope this can be useful...I always start with the $5 instance as they can be scaled easily. Takes less than 30mins. # add swap space & disable SElinux sudo dd if=/dev/zero of=/swapfile count=2000 bs=1MiB mkswap /swapfile swapon /swapfile echo "/swapfile swap swap sw 0 0" >> /etc/fstab sed -i -e 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config #reboot server reboot # Configure yum repos. yum install -y epel-release yum install -y wget wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm rpm -Uvh remi-release-7.rpm yum-config-manager --enable remi-php70 yum install -y http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm # install LAMP stack. PHP 7, Apache 2.4, and MySql/Percona 5.7 yum install -y httpd yum install -y php yum install -y php-mysqlnd yum install -y Percona-Server-server-57 yum install -y python-certbot-apache # setup Apache document root. useradd abc.com mkdir /home/abc.com/public_html cat << EOF > /etc/httpd/conf.d/abc.com.conf <VirtualHost *:80> ServerAdmin admin@abc.com DocumentRoot /home/abc.com/public_html ServerName abc.com ServerAlias www.abc.com ErrorLog "/var/log/abc.com-error_log" CustomLog "/var/log/abc.com-access_log" combined LogLevel error </VirtualHost> EOF # Start Apache systemctl start httpd # Set you DNS for abc.com, then install Let's Encrypt's free SSL. certbot --apache -d abc.com -d www.abc.com # Init MySQL systemctl start mysqld # Get MySQl root password. grep password /var/log/mysqld.log # Login to MySQL mysql -p # Run in MySQL client, change root password and create a mysql user ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password'; CREATE USER 'mysql'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON *.* TO 'mysql'@'localhost'; # Back to Bash shell. Restart and enable boot startup of Apache and MySQL systemctl enable httpd systemctl enable mysqld systemctl restart httpd systemctl restart mysqld
  2. 1 point

    State Selector for BS

    @helenium7 Yes, it's the double 'c' that is causing the problem. The current coding style is getting away from having the TABLE_ declaration, and actually using the table name. Here, it's supposed to be "configuration". So, just delete the extra 'c'. Malcolm
  3. 1 point

    KissIT Image Thumnailer

    @discxpress, the main image is tagged for search engines in this line: echo tep_image('images/' . $product_info['products_image'], NULL, NULL, NULL, 'itemprop="image" style="display:none;"'); and yes, the actual version is r27, r30 is not yet released, my faut, sorry. r27 includes already the alt tag like you said.