linux 安装最小化系统,[操作系统]最小化安装linux CentOS

[操作系统]最小化安装linux CentOS

0

2015-10-22 10:00:10

参考:http://blog.itpub.net/7734666/viewspace-1292485/

安装一些必要软件

yum -y install wget

yum -y install gcc

yum -y install perl

mkdir ~/zy

cd ~/zy

安装:libfastcommon

下载:

wget https://codeload.github.com/happyfish100/libfastcommon/tar.gz/V1.0.7

解压:

tar -zxvf V1.0.7

进入解压后的目录

cd libfastcommon-1.0.7/

执行命令

./make.sh

./make.sh install

所以需要创建软链接.

ln -s /usr/lib64/libfastcommon.so /usr/local/lib/libfastcommon.so

ln -s /usr/lib64/libfastcommon.so /usr/lib/libfastcommon.so

ln -s /usr/lib64/libfdfsclient.so /usr/local/lib/libfdfsclient.so

ln -s /usr/lib64/libfdfsclient.so /usr/lib/libfdfsclient.so

安装FastDFS

下载

wget https://codeload.github.com/happyfish100/fastdfs/tar.gz/V5.05

解压:

tar -zxvf V5.05

执行下面命令不解释

cd fastdfs-5.05/

./make.sh

./make.sh install

cd /etc/fdfs/

cp tracker.conf.sample tracker.conf

vi /etc/fdfs/tracker.conf文件,修改如下内容

base_path=/tracker

保存

mkdir /tracker

fdfs_trackerd tracker.conf

cp storage.conf.sample storage.conf

修改内容

vi /etc/fdfs/storage.conf

group_name=group1

base_path=/storage

store_path0=/storage

tracker_server=192.168.160.128:22122

mkdir /storage

fdfs_storaged storage.conf

解压fastdfs-nginx-module

解压fastdfs-nginx-module

wget http://nchc.dl.sourceforge.net/project/fastdfs/FastDFS%20Nginx%20Module%20Source%20Code/fastdfs-nginx-module_v1.16.tar.gz

tar -zxvf fastdfs-nginx-module_v1.16.tar.gz

vi fastdfs-nginx-module/src/config

修改fastdfs-nginx-module的config文件

原来的内容是

CORE_INCS="$CORE_INCS /usr/local/include/fastdfs /usr/local/include/fastcommon/"

vim /home/nginx/fastdfs-nginx-module/src/config,修改为

CORE_INCS="$CORE_INCS /usr/include/fastdfs /usr/include/fastcommon"

安装nginx

wget http://nginx.org/download/nginx-1.9.5.tar.gz

yum -y install gcc automake autoconf libtool make gcc-c++ pcre* zlib openssl openssl-devel

mkdir /home/nginx

tar -zxvf nginx-1.9.5.tar.gz

mv fastdfs-nginx-module /home/nginx

cd nginx-1.9.5

./configure \

--prefix=/home/nginx/nginx-1.6.2 \

--sbin-path=/home/nginx/nginx-1.6.2/nginx \

--conf-path=/home/nginx/nginx-1.6.2/nginx.conf \

--pid-path=/home/nginx/nginx-1.6.2/nginx.pid \

--with-http_ssl_module \

--add-module=/home/nginx/fastdfs-nginx-module/src

make -j `cat /proc/cpuinfo | grep processor| wc -l` && make install

cp /home/nginx/fastdfs-nginx-module//src/mod_fastdfs.conf /etc/fdfs

vi /etc/fdfs/mod_fastdfs.conf

cd ~/zy/fastdfs-5.05/conf

cp http.conf mime.types /etc/fdfs/

cd /home/nginx/nginx-1.6.2/

vi nginx.conf

修改Nginx配置文件

location /M00 {

root /storage;

ngx_fastdfs_module;

}

cd /storage/

ln -s data/ M00

/home/nginx/nginx-1.6.2/nginx

vi /etc/sysconfig/iptables

添加

-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

-A INPUT -m state --state NEW -m tcp -p tcp --dport 22122 -j ACCEPT

-A INPUT -m state --state NEW -m tcp -p tcp --dport 23000 -j ACCEPT

service iptables restart

下载

libfastcommon

https://codeload.github.com/happyfish100/libfastcommon/tar.gz/V1.0.7

fastdfs-nginx-module下载地址

http://nchc.dl.sourceforge.net/project/fastdfs/FastDFS%20Nginx%20Module%20Source%20Code/fastdfs-nginx-module_v1.16.tar.gz

fastdfs

https://codeload.github.com/happyfish100/fastdfs/tar.gz/V5.05

nginx

http://nginx.org/download/nginx-1.9.5.tar.gz

转载请保留本文网址:http://www.shaoqun.com/a/151621.html

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:admin@shaoqun.com。

Centos

0

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值