时间:2021-07-01 10:21:17 帮助过:22人阅读
make && make install
cp php.ini-production /usr/local/php/etc/php.ini
rm -rf /etc/php.ini
ln -s /usr/local/php/etc/php.ini /etc/php.ini
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
vi /usr/local/php/etc/php-fpm.conf #在这个文件中设置 3项
user = www
group = www
pid = run/php-fpm.pid #去掉了前面的分号
cp /home/feng/php-5.6.31/sapi/fpm/init.d.php-fpm /etc/rc.d/init.d/php-fpm
chmod 755 /etc/rc.d/init.d/php-fpm
chkconfig php-fpm on
vi /etc/php.ini
data.timezone = RPC #设置时区
0x10 配置nginx支持php
mkdir -p /home/wwwroot
chown -R www:www /home/wwwroot
vi /usr/local/nginx/conf/nginx.conf
user www www;
root /home/wwwroot #web根目录
index index.php index.html index.htm; #添加index.php
location ~ \.php$ {
root /home/wwwroot;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
/etc/init.d/nginx restart
0x11 测试
cd /home/wwwroot
vi index.php
<?php phpinfo();?>
chown -R www:www /home/wwwroot
curl http://127.0.0.1/
curl http://localhost/
配置python3
# wget http://192.168.40.66/python3.tar.gz
tar -zxvf python3.tar.gz
cd Python-3.6.2/
./configure --prefix=/usr/local/python3 && make && make install
ln -s /usr/local/python3/bin/python3.6 /usr/bin/python3
cd /home/ht
配置libevent 与 memcached
99 wget http://192.168.100.252/src/libevent.tar.gz
100 wget http://192.168.100.252/src/memcached.tar.gz
102 tar -zxvf libevent.tar.gz
103 cd libevent-2.1.8-stable/
104 ./configure --prefix=/usr/local/libevent
105 make && make install
106 cd ..
108 tar -zxvf memcached.tar.gz
109 cd memcached-1.5.0/
111 ./configure --prefix=/usr/local/memcached --enable-sasl --with-libevent=/usr/local/libevent && make && make install
cd /usr/local/python3/bin
./pip3.6 install python3-memcached
配置gcc
209 wget http://192.168.100.252/src/gcc.tar.gz
210 tar -zxvf gcc.tar.gz
211 mkdir gccmake
213 cd gcc-4.9.4/
214 vi ./contrib/download_prerequisites
wget http://192.168.100.252/src/gcc/$MPFR.tar.bz2 || exit 1 (配置文件,改URL)
215 ./contrib/download_prerequisites
216 cd ..
220 cd gccmake
221 ../gcc-4.9.4/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
223 make && make install
配置redis
cd /home/ht
224 wget http://192.168.100.252/src/tcl.tar.gz
225 wget http://192.168.100.252/src/redis.tar.gz
232 tar -zxvf tcl.tar.gz
234 cd tcl8.6.6/
236 cd /home/ht
237 rm -rf /usr/lib64/libstdc
239 cp /home/ht/soft/gccmake/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so /usr/lib64/libstdc++.so.
240 rm -rf /usr/lib64/libstdc++.so.6
241 ln -sv /usr/lib64/libstdc++.so /usr/lib64/libstdc++.so.6
242 gcc -v
243 cd /home/ht
246 cd tcl8.6.6/
247 cd unix
./configure
252 make install && make install-private-headers
253 cd ..
255 tar -zxvf redis.tar.gz
257 cd redis-3.2.10/
258 make PREFIX=/usr/local/redis install
259 cd /usr/local/redis/
260 mkdir conf
261 cd /home/jue/
263 cd redis-3.2.10/
265 cp redis.conf /usr/local/redis/conf
266 cd ..
268 ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql
269 ln -s /usr/local/mysql/include/mysql /usr/include/mysql
288 ./pip3.6 install python-redis (在 /usr/local/python3/bin 下)
配置erlang
394 cd /home/ht
395 ls
396 mkdir rabbit
cd rabbit
399 wget http://192.168.100.252/src/rabbitmq.tar.xz
400 wget http://192.168.100.252/src/otp.tar.gz
401 yum install kernel-devel m4 ncurses-devel openssl-devel
408 tar -zxvf otp.tar.gz
411 cd otp_src_20.0/
412 ./configure --prefix=/usr/local/erlang --with-ssl --enable-threads --enable-smmp-support --enable-kernel-poll --enable-hipe --without-javac
416 make && make install
配置rabbit
450 cd /usr/bin
452 rm -rf python python2
453 ll python*
455 vim yum
470 cd /usr/bin
471 ln -sv /usr/local/python3/bin/python3.6 /usr/bin/python
484 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo ( 视察情况)(yum源)
485 yum makecache(yum缓存)
525 vi /etc/profile
526 source /etc/profile
cd rabbit
442 tar -xvf rabbitmq.tar.xz
534 cd rabbitmq-server-3.6.10/
537 yum install zip rsync libxslt -y
538 make PREFIX=/usr/local/rabbitmq install
make && make install
539 cd /usr/local/python3/bin
541 ./pip3.6 install simplejson
linux 基础学习编译安装php+mysql+python3+memcached+radis+rabbitmq+libevent+tcl+gcc+erlang
标签:linux 基础学习之一