开发环境初始化(centos7)

Posted in 2016-12-26 14:56 | Category: Linux | Tags: centos redis linux python mysql

新建用户

[root@localhost]# passwd honmaple
Changing password for user honmaple.
New password:
BAD PASSWORD: The password contains the user name in some form
Retype new password:
passwd: all authentication tokens updated successfully.

安装mysql

参考步骤: http://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/

下载安装

[root@localhost]# wget http://dev.mysql.com/get/mysql57-community-release-el6-8.noarch.rpm
[root@localhost]# rpm -Uvh mysql57-community-release-el6-8.noarch.rpm
[root@localhost]# yum list installed | grep mysql
mysql57-community-release.noarch     el6-8                          installed
[root@localhost]# yum install mysql-community-server
错误:软件包:2:postfix-2.10.1-6.el7.x86_64 (@anaconda)
          需要:libmysqlclient.so.18(libmysqlclient_18)(64bit …

centos升级git至最新版本

Posted in 2016-12-26 14:56 | Category: Linux | Tags: centos git linux

原因

centos默认git 版本 1.7.1

$ git clone

时报错:

The requested URL returned error: 401 Unauthorized while accessing

无法使用http + username + password 方式

升级

下载源码

https://www.kernel.org/pub/software/scm/git/

$ wget https://www.kernel.org/pub/software/scm/git/git-2.11.0.tar.xz
$ tar xvf git-2.11.0.tar.xz

编译

$ sudo mkdir -p /opt/git
$ cd git-2.11.0
$ ./configure --prefix=/opt/git/
$  make
$  sudo yum remove git
$ sudo make install

修改.bashrc

export PATH=$PATH:/opt/git/bin

然后

$ source .bashrc

ok,查看版本

$ git --version
git version 2.11.0

centos搭建shadowsocks服务端

Posted in 2015-12-22 8:48 | Category: Linux | Tags: centos shadowsocks linux

刚搭建好,记录下来,用的是centos

1.安装必要组建

# yum install build-essential autoconf libtool openssl-devel gcc -y

2.安装git

# yum install git -y 
# git --version #安装完后查看版本

3.下载shadowsocks-libev源码包并且编译安装

$ git clone https://github.com/madeye/shadowsocks-libev.git
$ cd shadowsocks-libev
$ ./configure 
# make && make install

.配置shadowsocks

# nohup /usr/local/bin/ss-server -s IP地址 -p 端口 -k 密码 -m 加密方式 &

注:ip地址为当前服务器ip,端口随意,加密方式建议为aes-256-cfb

5.加入开机启动

# echo "nohup /usr/local/bin/ss-server -s IP地址 -p 端口 -k 密码 -m 加密方式 &" >> /etc/rc.local

6.加入防火墙

# vim /etc/sysconfig/iptables

增加
-A INPUT -m state --state NEW -m tcp -p tcp --dport 端口 -j ACCEPT
重启防火墙

# service iptables restart

7.客户端配置

下载地址
注:如果http://sourceforge.net/进不去可以http://sourceforge.jp
客户端中两个端口,一个是服务端(自己设的端口) ,另一个本地端口(默认1080),配置完成启用系统代理,并且选PAC模式


ok,就这样