centos yum  Subversion (SVN) 1.9

lrenwang , 2016/11/11 17:11 , Linux , 评论(0) , 阅读(1445) , Via 本站原创
vim /etc/yum.repos.d/wandisco-svn.repo




[WandiscoSVN]
name=Wandisco SVN Repo
baseurl=http://opensource.wandisco.com/centos/$releasever/svn-1.9/RPMS/$basearch/
enabled=1
gpgcheck=0


yum -y install subversion


keytool 安卓证书

lrenwang , 2016/04/05 12:52 , Linux , 评论(0) , 阅读(1404) , Via 本站原创
生成证书
keytool -genkeypair -alias "test1" -keyalg "RSA" -keystore "d:\test.keystore"  


查看证书
keytool -list -keystore  d:\test.keystore
Tags:

数据库自动备份

lrenwang , 2015/11/11 18:01 , Linux , 评论(0) , 阅读(1717) , Via 本站原创
#!/bin/sh
/usr/local/webserver/mysql/bin/mysqldump -u root -p123456 table > /data/bak/$(date -d "today" +"%Y%m%d").sql

no space left on device linux

lrenwang , 2015/11/01 19:37 , Linux , 评论(0) , 阅读(1513) , Via 本站原创
/var/spool/postfix/

干掉这里的就行了
解决方法:
     修改“/etc/crontab”
     将‘MAILTO=root’替换成‘MAILTO=""’修改之后没有成功,需要重启crond服务才可以
     也可从在crontab(crontab -e)中最前面直接加入MAILTO=""
安装环境 centos7(64位) php5.4 mysql5.6 nginx1.9

注意要把php httpd   mariadb卸载干净

vim复制自动注释解决办法
echo 'set paste' >> /etc/vimrc


注意安装mysql5.7需要大内存


一挂载数据盘
执行“fdisk -S 56 /dev/xvdb”命令,对数据盘进行分区;
根据提示,依次输入“n”,“p”“1”,两次回车,“wq”,分区就开始了,很快就会完成。
使用“fdisk -l”命令可以看到,新的分区xvdb1已经建立完成了。
使用“mkfs.ext4 /dev/xvdb1”命令对新分区进行格式化,格式化的时间根据硬盘大小有所不同。
使用“echo '/dev/xvdb1  /data ext4    defaults    0  0' >> /etc/fstab”(不含引号)命令写入新分区信息。
然后使用“cat /etc/fstab”命令查看,出现以下信息就表示写入成功。
mkdir /data
使用“mount -a”命令挂载新分区,然后用“df -h”命令查看,出现以下信息就说明挂载成功,可以开始使用新的分区了。

二cp 命令直接覆盖,不需要提示

sed -i "s/alias cp='cp -i'/#alias cp='cp -i'/g" ~/.bashrc
su -

三更新所需的安装包

yum -y update
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses curses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers vsftpd patch zip unzip vim wget ncurses-devel cmake bison bison-devel boostl libtool-ltdl-devel libmcrypt  memcached
yum -y remove mariadb*


四软件下载

mkdir /data/soft/config -p
cd /data/soft
wget http://mirrors.sohu.com/nginx/nginx-1.9.9.tar.gz
wget http://mirrors.sohu.com/php/php-5.4.45.tar.gz
wget http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.34.tar.gz
wget http://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.gz/download
mv download boost_1_58_0.tar.gz
wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
wget http://pecl.php.net/get/memcached-2.2.0.tgz
wget http://blog.lrenwang.com/down/lnmp/libiconv-1.13.tar.gz
wget http://blog.lrenwang.com/down/lnmp/libmcrypt-2.5.8.tar.gz
wget http://blog.lrenwang.com/down/lnmp/mcrypt-2.6.8.tar.gz
wget http://blog.lrenwang.com/down/lnmp/mhash-0.9.9.9.tar.gz
wget http://blog.lrenwang.com/down/lnmp/pcre-8.33.zip
cd /data/soft/config
wget http://blog.lrenwang.com/down/lnmp/config/php.ini
wget http://blog.lrenwang.com/down/lnmp/config/my.cnf
wget http://blog.lrenwang.com/down/lnmp/config/php-fpm.conf
wget http://blog.lrenwang.com/down/lnmp/config/nginx.conf
wget http://blog.lrenwang.com/down/lnmp/config/fcgi.conf

五安装php mysql


#1、编译安装PHP所需的支持库:


tar zxvf libiconv-1.13.tar.gz
cd libiconv-1.13/
./configure --prefix=/usr/local
make
make install
cd ../
tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8/
./configure
make
make install
/sbin/ldconfig
cd libltdl/
./configure --enable-ltdl-install
make
make install
cd ../../

tar zxvf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9/
./configure
make
make install
cd ../
ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1

tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8/
/sbin/ldconfig
./configure
make
make install
cd ../


tar zxvf boost_1_58_0.tar.gz
cd boost_1_58_0
./bootstrap.sh
./bjam
./bjam install


#2、编译安装mysql

/usr/sbin/groupadd mysql
/usr/sbin/useradd -g mysql mysql
tar zxvf mysql-5.6.34.tar.gz
cd mysql-5.6.34/
cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/webserver/mysql/   \
-DMYSQL_DATADIR=/data/mysql/data   \
-DSYSCONFDIR=/etc -DWITH_MYISAM_STORAGE_ENGINE=1   \
-DWITH_INNOBASE_STORAGE_ENGINE=1   \
-DWITH_MEMORY_STORAGE_ENGINE=1   \
-DWITH_READLINE=1   \
-DMYSQL_UNIX_ADDR=/tmp/mysql.sock   \
-DMYSQL_TCP_PORT=3306   \
-DENABLED_LOCAL_INFILE=1   \
-DWITH_PARTITION_STORAGE_ENGINE=1   \
-DEXTRA_CHARSETS=all \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci
make && make install
chmod +w /usr/local/webserver/mysql
chown -R mysql:mysql /usr/local/webserver/mysql
cp support-files/mysql.server /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
chkconfig --level 2345 mysqld on
cd ../
mkdir /data/mysql/
cp config/my.cnf /data/mysql/my.cnf
chown mysql:mysql -R /data/mysql/

小内存切换默认引擎,否则无法启动
[mysqld]
default-storage-engine = MyISAM

#生成数据库 启动服务进程 修改密码

/usr/local/webserver/mysql/scripts/mysql_install_db --basedir=/usr/local/webserver/mysql --datadir=/data/mysql/data --user=mysql
service mysqld start
/usr/local/webserver/mysql/bin/mysqladmin -uroot password "123456" -p


#3、编译安装PHP

/usr/sbin/groupadd www
/usr/sbin/useradd -g www www
ln -s /usr/lib64/lib* /usr/lib/
ln -s /usr/local/webserver/mysql/lib/*  /usr/lib64/
tar zxvf php-5.4.45.tar.gz
cd  php-5.4.45

./configure --prefix=/usr/local/webserver/php --with-config-file-path=/usr/local/webserver/php/etc --with-mysql=/usr/local/webserver/mysql --with-mysqli=/usr/local/webserver/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath  --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl  --enable-mbregex  --enable-fpm  --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap --without-pear  --with-fpm-user=www --with-fpm-group=www -disable-fileinfo  -with-pdo-mysql
make ZEND_EXTRA_LIBS='-liconv'
make install
cp  sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod 755 /etc/init.d/php-fpm
chkconfig php-fpm on
cp /usr/local/webserver/php/etc/php-fpm.conf.default /usr/local/webserver/php/etc/php-fpm.conf
cp php.ini-production /usr/local/webserver/php/etc/php.ini
cd ../


ln -s /usr/local/webserver/mysql/include/mysql/*  /usr/local/include/
tar zxvf PDO_MYSQL-1.0.2.tgz
cd PDO_MYSQL-1.0.2/
/usr/local/webserver/php/bin/phpize
./configure --with-php-config=/usr/local/webserver/php/bin/php-config --with-pdo-mysql=/usr/local/webserver/mysql
make
make install
cd ../

#修改php.ini文件
extension = "pdo_mysql.so"
service php-fpm start

# 设置 /usr/local/webserver/php/etc/php-fpm.conf   /usr/local/webserver/php/etc/php.ini相关信息
六安装Nginx

unzip pcre-8.33.zip
cd pcre-8.33/
./configure
make && make install
cd ../
ln -s /usr/local/lib/libpcre.so.1 /lib/
ln -s /lib/libpcre.so.1 /lib64/
#2、安装Nginx
tar zxvf nginx-1.9.9.tar.gz
cd nginx-1.9.9/
./configure --user=www --group=www --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_module
make && make install
cd ../


2创建Nginx日志目录

mkdir -p /data/logs
chmod +w /data/logs
chown -R www:www /data/logs

3创建Nginx配置文件

cp config/nginx.conf /usr/local/webserver/nginx/conf/nginx.conf
cp config/fcgi.conf /usr/local/webserver/nginx/conf/fcgi.conf


4启动Nginx

ulimit -SHn 65535
/usr/local/webserver/nginx/sbin/nginx

5配置开机自动启动

echo "ulimit -SHn 65535" >> /etc/rc.d/rc.local
echo "/usr/local/webserver/nginx/sbin/nginx"  >>  /etc/rc.d/rc.local

6 PHP memcached
tar zxvf libmemcached-1.0.18.tar.gz
cd libmemcached-1.0.18
./configure --prefix=/usr/lib/libmemcached --with-memcached
make && make install
cd ..

tar -zxvf memcached-2.2.0.tgz
cd memcached-2.2.0
/usr/local/webserver/php/bin/phpize
./configure -enable-memcached -with-php-config=/usr/local/webserver/php/bin/php-config -with-zlib-dir --with-libmemcached-dir=/usr/lib/libmemcached -prefix=/usr/local/webserver/phpmemcached
make && make install
vim /usr/local/webserver/php/etc/php.ini
extension=memcached.so
cd ..


分页: 2/49 第一页 上页 1 2 3 4 5 6 7 8 9 10 下页 最后页 [ 显示模式: 摘要 | 列表 ]