Saturday 30 January 2016

Install LAMP on centOS



export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_TYPE=en_US.UTF-8

#####################################
# CONFIGURE FTP
#/etc/vsftpd/ftpusers ---> remove root
#/etc/vsftpd/vsftpd.conf ----> anonymous_enable=NO  //
#                              ascii_upload_enable=YES
#                              ascii_download_enable=YES
#                              use_localtime=YES
#                               local_root=/
#####################################
#install http server
yum -y install httpd httpd-devel
###########################
#update rpm repository and install php5.6 components
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
yum -y install php56w php56w-opcache php56w-devel php56w-pecl-geoip php56w-mysql phpmyadmin -y
######################################
#update yum repository and install MariaDB updated version (mysql server)
echo "# MariaDB 10.0 CentOS repository list - created 2013-08-23 13:08 UTC" > /etc/yum.repos.d/MariaDB.repo
echo "# http://mariadb.org/mariadb/repositories/" >> /etc/yum.repos.d/MariaDB.repo
echo "[mariadb]" >> /etc/yum.repos.d/MariaDB.repo
echo "name = MariaDB" >> /etc/yum.repos.d/MariaDB.repo
echo "baseurl = http://yum.mariadb.org/10.0/centos6-amd64" >> /etc/yum.repos.d/MariaDB.repo
echo "gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB" >> /etc/yum.repos.d/MariaDB.repo
echo "gpgcheck=1" >> /etc/yum.repos.d/MariaDB.repo
yum -y install MariaDB-client MariaDB-server MariaDB-devel
service mysql start

#configuring mysql server
mysql_secure_installation




#########################################

wget http://xcache.lighttpd.net/pub/Releases/3.2.0/xcache-3.2.0.tar.gz
tar -zxvf xcache-3.2.0.tar.gz
cd xcache-3.2.0
/usr/bin/phpize
./configure --enable-xcache --enable-xcache-coverager --enable-xcache-optimizer --with-php-config=/usr/bin/php-config
make && make install
cp xcache.ini /etc/php.d

#wget http://pecl.php.net/get/geoip-1.1.0.tgz
#tar -xzf geoip-1.0.3.tgz
#cd geoip-1.1.0
#/usr/bin/phpize
#./configure
#make
#make install

#yum install GeoIP-devel

#pecl install geoip

#change phpmyadmin and php.ini settings
#/etc/httpd/conf.d/phpMyAdmin.conf
#/etc/php.ini ---- memory_limit = 256M  upload_max_filesize = 20M

#################
#start http ftp services and set auto start on reboot
service httpd restart
service vsftpd restart
chkconfig httpd on
chkconfig vsftpd on
chkconfig mysql on


No comments:

Post a Comment