vi /etc/sysconfig/network-scripts/ifcfg-eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.130
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=8.8.8.8
service network restart
vi /etc/selinux/config
SELINUX=disabled
setenforce 0
ping baidu.com
yum install -y vim man wget tree gcc-c++ cmake autoconf
yum update -y
注意iptables
yum install -y apr-util
cp ab /usr/bin
chmod +x /usr/bin/ab
cp /etc/DIR_COLORS $HOME/.dir_colors
alias ls='ls --color=auto'
which ls
1.可以把当前shell当成编辑器来用,编辑完内容后Ctrl-D可以输入抄送人,可用逗号分隔,回车后发送。
2.使用管道
3.以file的内容为邮件内容发信
cd /usr/src
wget http://prdownloads.sourceforge.net/webadmin/webmin-1.680-1.noarch.rpm
rpm -U webmin-1.680-1.noarch.rpm
注意:webmin基于WEB,需要现有nginx/apache
sudo apt-get install sendmail
cd /etc/mail/
vi sendmail.mc
# DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl# 改为
DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=0.0.0.0')dnl
mv sendmail.cf sendmail.cd.bak
m4 sendmail.mc > sendmail.cf
测试:
注意:
防火墙25端口需要打开才能发送;
本机hosts要配置好,否则拖慢邮件速度。
sudo select-editor
或
sudo apt-get purge remove nano
# 安装新内核
sudo aptitude install linux-image-3.8.0-36-generic linux-headers-3.8.0-36-generic -y
# 移除当前内核
aptitude remove linux-image-3.13.0-32-generic -y
# 删除当前内核无用文件
cd /boot
rm -i *13*
# 重新生成grub
sudo update-grub
# 重启应用新内核
sudo reboot
[服务端]
# 安装NFS组件
yum install -y nfs-utils-lib
# 启动
/etc/init.d/rpcbind start
/etc/init.d/nfs start
chkconfig nfs on
# 编辑配置文件
vi /etc/exports
/opt/nfs 192.168.10.122(ro,no_root_squash)
# 重新扫描NFS目录
exportfs -a
# 显示NFS服务端可供挂载的目录
showmount -e 192.168.10.133
ps:注意防火墙
service iptables stop
[客户端]
yum install -y nfs-utils-lib
showmount -e 192.168.10.133
# 挂载NFS
mount -t nfs 192.168.10.133:/mnt/kaltura-web/ /opt/kaltura/web/
# 启动时自动挂载
vi /etc/rc.loacl
mount -t nfs 192.168.10.133:/mnt/kaltura-web/ /opt/kaltura/web/
# 方便时使用mount -a
vi /etc/fstab
192.168.10.133:/opt/kaltura/web/ /opt/kaltura/web/ nfs defaults 0 0
版本选择:http://pecl.php.net/package/mongo
cd /usr/local/src
wget http://pecl.php.net/get/mongo-1.5.8.tgz
tar zxf mongo-1.5.8.tgz
cd mongo-1.5.8
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make -j5 install
vim /usr/local/php/etc/php.ini
extension=mongo.so
1.下载libfastcommon
https://github.com/happyfish100/libfastcommon
cd libfastcommon
./make.sh
./make.sh install
2.下载FastDFS
http://sourceforge.net/projects/fastdfs/files/FastDFS%20Server%20Source%20Code/
cd FastDFS
./make.sh
./make.sh install
3.配置FastDFS客户端
cd /etc/fdfs
cp client.conf.sample client.conf
mkdir /opt/fastdfs
vi client.conf
base_path=/opt/fastdfs
tracker_server=10.207.164.154:22122
http.tracker_server_port=8090
4.安装php扩展
cd FastDFS/php_client
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make clean
make -j5 install
cat /usr/local/src/FastDFS/php_client/fastdfs_client.ini >> /usr/local/php/etc/php.ini
service php-fpm reload
yum downgrade kaltura-base
/var/cache/yum/x86_64/6
w
who am i
pkill -kill -t tty1