摘要:一關(guān)閉防火墻和關(guān)閉防火墻停止禁止開機(jī)啟動(dòng)關(guān)閉安全系統(tǒng)將改為重啟二安裝和編譯工具三安裝基礎(chǔ)軟件包安裝安裝程序庫(kù)安裝加密擴(kuò)展庫(kù)安裝擴(kuò)展庫(kù)安裝擴(kuò)展庫(kù)安裝壓縮函式庫(kù)安裝圖片處理函數(shù)庫(kù)安裝圖片處理函數(shù)庫(kù)
一. 關(guān)閉CentOS7防火墻和SELinux
1.關(guān)閉CentOS7防火墻
systemctl stop firewalld.service#停止firewall systemctl disable firewalld.service#禁止firewall開機(jī)啟動(dòng)
2.關(guān)閉SElinux安全系統(tǒng)
vim /etc/selinux/config 將SELINUX=enforcing改為SELINUX=disabled 重啟CentOS
二. yum安裝gcc和gcc-c++編譯工具
yum install gcc yum install gcc-c++
三. 安裝基礎(chǔ)軟件包
1.yum安裝python-devel
yum -y install python-devel
2.安裝XML程序庫(kù)libxml2
cd /libxml2-2.9.1 ./configure --prefix=/usr/local/libxml2 make && make install
3.安裝libmcrypt加密擴(kuò)展庫(kù)
cd /libmcrypt-2.5.8 ./configure --prefix=/usr/local/libmcrypt/ make && make install
4.安裝mhash擴(kuò)展庫(kù)
cd /mhash-0.9.9.9 ./configure make && make install
5.安裝mhash擴(kuò)展庫(kù)
cd /ftp/mcrypt-2.6.8 LD_LIBRARY_PATH=/usr/local/libmcrypt/lib:/usr/local/lib ./configure --with-libmcrypt-prefix=/usr/local/libmcrypt make && make install
6.安裝zlib壓縮函式庫(kù)
cd /zlib-1.2.8 ./configure make && make install
7.安裝圖片處理函數(shù)庫(kù)libpng
cd /libpng-1.5.26 ./configure --prefix=/usr/local/libpng/ make && make install
8.安裝圖片處理函數(shù)庫(kù)libjpeg
mkdir /usr/local/jpeg9 mkdir /usr/local/jpeg9/bin mkdir /usr/local/jpeg9/lib mkdir /usr/local/jpeg9/include mkdir -p /usr/local/jpeg6/man/man1 cd /jpeg-9 ./configure --prefix=/usr/local/jpeg6/ --enable-shared --enable-static make && make install
9.安裝freetype
cd /freetype-2.6.3 ./configure --prefix=/usr/local/freetype/ make && make install
10.安裝GD庫(kù)
cd /libgd-2.1.1 vim gd_png.c(修改#include "png.h"為#include "/usr/local/libpng/include/png.h") ./configure --prefix=/usr/local/gd2/ --with-jpeg=/usr/local/jpeg9/ --with-freetype=/usr/local/freetype/ --with-png=/usr/local/libpng/ make && make install
11.安裝curl庫(kù)
cd curl-7.48.0 ./configure --prefix=/usr/local/curl make && make install
四. 安裝apache
1.在http://httpd.apache.org/downl...
2.在http://apr.apache.org/downloa...
3.在http://pcre.org/下載pcre-8.38...
tar -zxvf apr-1.5.2.tar.gz tar -zxvf apr-util-1.5.4.tar.gz tar -zxvf httpd-2.4.18.tar.gz cp -r apr-1.5.2 httpd-2.4.18/srclib/apr cp -r apr-util-1.5.4 httpd-2.4.18/srclib/apr-util tar -zxvf pcre-8.38.tar.gz cd pcre-8.38 ./configure
make && make install
4.安裝apache
cd /httpd-2.4.18 ./configure --prefix=/usr/local/apache2/ --sysconfdir=/usr/local/apache2/etc/ --with-included-apr --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared make && make install
五. 編譯安裝mysql
1.yum安裝cmake和ncurses庫(kù)
yum -y install ncurses-devel yum -y install cmake bison
2.創(chuàng)建mysql系統(tǒng)用戶
groupadd mysql useradd -r -g mysql mysql
3.在http://www.boost.org/下載boos...
tar -zvxf boost_1_59_0.tar.gz mkdir /usr/local/boost cp -rf ./boost_1_59_0 /usr/local/boost
4.cmake編譯安裝mysql
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_BOOST=/usr/local/boost -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=/var/mysql/data -DMYSQL_USER=mysql -DMYSQL_TCP_PORT=3306 make && make install
5.mysql目錄權(quán)限配置及初始化
cd /usr/local/mysql mkdir -p /var/mysql/data ./bin/mysqld --initialize --user=mysql --datadir=/var/mysql/data --basedir=/usr/local/mysql --socket=/tmp/mysql.sock cp /usr/local/mysql/support-files/my-default.cnf /etc/my.cnf vim /etc/my.cnf 添加:port=3306 basedir=/usr/local/mysql datadir=/var/mysql/data socket=/tmp/mysql.sock log-error = /var/log/mysql-error.log
#啟動(dòng)mysql修改密碼
/usr/local/mysql/bin/mysqld_safe --user=mysql & /usr/local/mysql/bin/mysql --user=root --password=初始密碼 set password=password("123456");
六. 編譯安裝PHP
yum install openssl openssl-devel yum install libXpm-devel 1.rpm -ql libXpm :查詢出libXpm的安裝位置,發(fā)現(xiàn)在/usr/lib64/ 下 2.重新編譯php,./configure中增加 --with-xpm-dir=/usr/lib64/ cd php-7.0.4 ./configure --prefix=/usr/local/php/ --with-config-file-path=/usr/local/php/etc/ --with-apxs2=/usr/local/apache2/bin/apxs --with-libxml-dir=/usr/local/libxml2/ --with-jpeg-dir=/usr/local/jpeg9/ --with-png-dir=/usr/local/libpng/ --with-freetype-dir=/usr/local/freetype/ --with-gd=/usr/local/gd2/ --with-mcrypt=/usr/local/libmcrypt/ --enable-soap --with-xpm-dir=/usr/lib64/ --with-curl=/usr/local/curl --with-openssl --enable-mbstring=all --enable-sockets --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-zlib --enable-ftp make && make install cp php.ini-production /usr/local/php/etc/php.ini vim /usr/local/apache2/etc/httpd.conf #修改apache配置文件 AddType application/x-httpd-php .php .phtml .phps /usr/local/apache2/bin/apachectl start
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://specialneedsforspecialkids.com/yun/28464.html
摘要:第一個(gè)人記憶中這款工具至今估計(jì)有十年左右時(shí)間當(dāng)初也是個(gè)人站長(zhǎng)為方便自己使用環(huán)境配置開發(fā)的。第二一鍵腳本也是由于個(gè)人站長(zhǎng)提供的,經(jīng)過(guò)幾年的改善目前也是比較完善。 早年我們?nèi)绻贚inux服務(wù)器配置網(wǎng)站環(huán)境的時(shí)候一般如何操作的?安裝cPanel面板?這個(gè)是要花錢的,記憶中好像每個(gè)月需要十多美元,對(duì)于普通的個(gè)人站長(zhǎng)用戶來(lái)說(shuō)確實(shí)是不小的費(fèi)用。即便我們用破解版也不行,因?yàn)檫@個(gè)牽扯到安全問(wèn)題。那我...
摘要:進(jìn)程是串行啟動(dòng),只有前一個(gè)進(jìn)程啟動(dòng)完,才會(huì)啟動(dòng)下一個(gè)進(jìn)程。是啟動(dòng)腳本復(fù)雜。進(jìn)程只是執(zhí)行啟動(dòng)腳本,不管其他事情。獨(dú)立虛擬主機(jī)配置編輯文件搜索通常是末尾在后面加上然后在下創(chuàng)建目錄,配置文件丟里面 Centos7.2搭建Lamp 今天記錄下搭建Lamp的過(guò)程(有錯(cuò)請(qǐng)指出,謝謝!!) 環(huán)境說(shuō)明: 使用的是阿里云的ECS,系統(tǒng)為Centos7.2 搭建Lamp線上環(huán)境(linux + apac...
閱讀 1387·2021-09-22 10:02
閱讀 1894·2021-09-08 09:35
閱讀 4057·2021-08-12 13:29
閱讀 2603·2019-08-30 15:55
閱讀 2263·2019-08-30 15:53
閱讀 2299·2019-08-29 17:13
閱讀 2759·2019-08-29 16:31
閱讀 2952·2019-08-29 12:24