CentOS6.5系統(tǒng)中的yum如何安裝LAMP
CentOS6.5系統(tǒng)中的yum如何安裝LAMP
CentOS6.5系統(tǒng)中LAMP是yum的一種常用環(huán)境,在CentOS6.5系統(tǒng)中的yum安裝LAMP的方法也是很簡(jiǎn)單的,下面學(xué)習(xí)啦小編就來為大家介紹一下CentOS6.5系統(tǒng)中的yum如何安裝LAMP,歡迎大家參考和學(xué)習(xí)。
具體的安裝方法如下:
1、安裝源
rpm -Uvh http://mirrors.yun-idc.com/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
2、更新并安裝基本庫(kù)
yum -y update
yum -y install gcc gcc-c++ autoconf automake zlib zlib-devel openssl openssl-devel pcre pcre-devel
3、安裝Apache和mysql
yum --enablerepo=remi -y install mysql mysql-server mysql-devel httpd httpd-devel
chkconfig httpd on
chkconfig mysqld on
service mysqld start
mysql安全設(shè)置
mysql_secure_installation
mysql -u root -p 輸入密碼
建立你要用數(shù)據(jù)庫(kù)。。。
4、安裝php
yum --enablerepo=remi -y install php php-mysql php-common php-devel php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt libmcrypt-devel
加密模塊
wget http://www.dmasoftlab.com/cont/download/ioncube_loaders_lin_x86-64.tar.gz
tar zxvf ioncube_loaders_lin_x86-64.tar.gz
cp -rf ioncube /usr/local/
sed -i ‘s/post_max_size = 8M/post_max_size = 50M/g’ /etc/php.ini
sed -i ‘s/upload_max_filesize = 2M/upload_max_filesize = 50M/g’ /etc/php.ini
sed -i ‘s/;date.timezone =/date.timezone = PRC/g’ /etc/php.ini
sed -i ‘s/; cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g’ /etc/php.ini
sed -i ‘s/max_execution_time = 30/max_execution_time = 300/g’ /etc/php.ini
sed -i ‘s/disable_functions =.*/disable_functions =passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server/g’ /etc/php.ini
echo “zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.4.so” 》》 /etc/php.ini
php加速模塊
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
phpize --clean
phpize
./configure --enable-xcache
make && make install
cat xcache.ini 》》 /etc/php.ini
vi /etc/httpd/conf/httpd.conf
將DirectoryIndex后添加index.php
service httpd start
5、測(cè)試
vi /var/www/html/index.php
phpinfo();
?>
在瀏覽器輸入http://yourserverip/,看到phpinfo信息就OK。
以上就是學(xué)習(xí)啦小編為大家整理的CentOS6.5系統(tǒng)中的yum如何安裝LAMP的全部?jī)?nèi)容了,希望對(duì)大家有所幫助。