-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinux_new_configration.txt
157 lines (115 loc) · 4.91 KB
/
linux_new_configration.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
#Config the Internet
1. if this is working on a virtual mechine, please set the connecting mode to brige.
2. vim the /etc/sysconfig/network-scripts/ifcfg-enp0s3 and set the ONBOOT to yes, like ONBOOT=yes
3. restart the network using the clt: service network restart.
4. check the network using ping command: ping www.baidu.com.
5. check the ip address by using clt: ip addr.
#Config the ssh service
1. vim the /etc/ssh/sshd_config and set PasswordAuthentication to yes , PermitRootLogin to yes
2. start/restart the ssh service using the clt: service sshd start/restart, and check the status using clt: service sshd status.
3. to start the ssh service when computer start, using the clt: chkconfig sshd on
#Config Yum Repos
1. delete all files in the /etc/yum.repos.d directory.
2. scp the repo file to the /etc/yum.repos.d directory.
3. using the following ctl:
yum clean all
yum makecache
yum update
#Set up the gcc-c++ developement tools
yum -y install gcc
yum -y install gcc-c++
yum -y install vim
you may want to copy the .vimrc file to ~ directory
#Set up the GDAL Environment
## Set up GEOS and PROJ.4(Not nesseccary)
./configure
make
make install
if it shows "tar: bzip2: Cannot exec: No such file or directory"
yum install bzip2 -y
user tar jxvf ..tar.bz2
if you have setted up the GEOS, you could see "GEOS support : yes" after you ./configure the GDAL.
## Set up GDAL
1. download the gdal librarys :http://download.osgeo.org/gdal/ using the following clt:
wget http://download.osgeo.org/gdal/CURRENT/gdal-2.2.4.tar.gz
if there is no wget tools , using the following command to set up:
yum -y install wget
2. unzip the tar.gz file using the clt: tar zxvf gdal-2.2.4.tar.gz
3. go to the gdal-2.2.4 directory and using the clt: ./configure
if you wanna use gdal in python environment, please use the following:
./configure --with-python
4. using the clt: make to compile the gdal libraries
5. using the clt: make install to install the gdal libraries
6. vim the ~/.bashrc and add the following lines:
export PATH=$PATH:/usr/local/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
7. using the clt: source ~/.bashrc
8. then you could use the gdal library. You need add -lgdal parameter when you compile the source file which use the gdal libraries.
you could test if the gdal has been setted up by : gdalinfo.
9. if you wanna use gdal in python, please use the following:
cd ./swig/python in the gdal setup dir
python setup.py build
python setup.py install
you may wanna try this to make sure your gdal-python has been installed
currectly.
python
from osgeo import gdal
## How to share files in VirtualBox
1. yum install -y gcc gcc-devel gcc-c++ gcc-c++-devel make kernel kernel-devel
2. reboot
3. Open VitrualBox , Go to Device -> Insert Guest Additions CD image in the
Menu.
4. In the linux, mount /dev/cdrom /mnt
5. Go to the /mnt, and ./VBoxLinuxAddtion.run
6. Mount the cdrom by using the command:
mount -t vboxsf <shared_name> <monnt_dir>
If something wrong happened like "unable to find the sources of your current Linux kernel." in the /var/log/vbox-install.log file, you may try this :
1. yum install gcc kernal-devel kernal-headers
2. export KERN_DIR=/usr/src/kernels/2.6.18-164.15.1.el5-i686/
then, try ./VBoxLinuxAddtion.run
## How to use shadowsocks and privoxy to set global http/https proxy
1. install shadowsocks
pip install shadowsocks
1.1 to install pip, following the instruction:
install python-dev : sudo yum install -y python-devel
install epel : yum install epel-release
install pip : yum install python-pip
2. configure the shadowsocks
vim /etc/shadowsocks.json and input the following configuration:
{
"server" : "ss_server",
"server_port" : 7777,
"local_address" : "127.0.0.1",
"local_port" : 1080,
"password" : "PWD",
"method" : "aes-256-cfb",
"remarks" : ""
}
3. start and stop the shadowsocks client by:
sslocal -c /etc/shadowsocks.json
sslocal -c /etc/shadowsocks.json -d start
sslocal -c /etc/shadowsocks.json -d stop
sslocal -c /etc/shadowsocks.json -d restart
4. to set the shadowsocks autostart when the server started.
vim /etc/rc.local and add the following before exit 0:
sudo sslocal -c /etc/shadowsocks.json -d start
5. to test whether the shadowsocks works.
curl --socks5 127.0.0.1:1080 http://httpbin.org/ip
6. install the privoxy
yum install privoxy
systemctl start/enable privoxy
7. configure the privoxy
vim /etc/privoxy/config and modify:
line 783: listen-address 127.0.0.1:8118
line 1336: forward-socks5t / 127.0.0.1:1080 .
vim /etc/profile and modify:
export https_proxy=http://127.0.0.1:8118
export http_proxy=http://127.0.0.1:8118
export ftp_proxy=http://127.0.0.1:8118
8. restart privoxy service:
systemctl restart privoxy
source /etc/profile
9. to test if privoxy works :
curl http://www.google.com
10. to set yum proxy :
proxy=http://127.0.0.1:8118/