-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAWSEC2_setup~
More file actions
73 lines (58 loc) · 2.59 KB
/
Copy pathAWSEC2_setup~
File metadata and controls
73 lines (58 loc) · 2.59 KB
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
// make key only readable and writable for you
sudo chmod 400 beiSentence.pem
ssh -i ../beiSentence.pem [email protected] // usrname@publicDNS_or_publicIP
// set up LAMP
sudo apt-get update
sudo apt-get install php5 apache2 libapache2-mod-php5 mysql-server php5-mysql
sudo service apache2 restart
mysql_secure_installation // let you to reset password
mysql -u root -p // run mysql
! MySQL password: 890925
! password related to phpaddmin with MySql: 890925
sudo apt-get install phpmyadmin // install UI for php communication with mysql
// create a symbolic link to phpmyadmin conf file.
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-enabled/phpmyadmin.conf
sudo service apache2 restart
// connection with AWS EC2 example
scp -i ../beiSentence.pem -r $1 [email protected]:beiSentenceTransport/
ssh -i ../beiSentence.pem [email protected] sudo cp -avr /home/ubuntu/beiSentenceTransport/$1 /var/www/html
// install Java (In my current version, no need for Java)
Step 1: Install Java 8 (JDK 8)
Open terminal and enter the following commands.
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
sudo apt-get -y install oracle-java8-installer
// Setup JAVA Environment
sudo apt-get -y install oracle-java8-set-default
Step 2: Verify JAVA Version
// After successfully installing oracle java using above step verify installed version using following command.
$ java -version
You see output similar to this.
java version “1.8.0_25”
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
// install beautifulsoup in Python
sudo apt-get install python-bs4
//### (If transfer) ####
// mysql export/import
export beiSentence.sql from old server
create a new user: developer (for example)
create a data base beiSentence, enter this then import from beiSentence.sql
1. send all the data to server
2. delete index.html
3. set parser write permission
// Install PHP's SSH2 extension
sudo aptitude install libssh2-1-dev libssh2-php
php -m |grep ssh2
sudo service apache2 restart
// install php-seclib
sudo apt-get install php-seclib
sudo service apache2 restart
// install xvfb (as a fake monitor for selenium mode to work)
sudo apt-get install xvfb
sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic
Xvfb :99 -ac &
export DISPLAY=:99
// (still not working)