VPS

De Memo
Aller à : navigation, rechercher

MySQL

/etc/init.d/mysql start
/etc/init.d/mysql stop
/etc/init.d/mysql restart
service mysql start
service mysql stop
service mysql restart


sudo apt-get clean


Apache

sudo service apache2 restart


FTP

mount --bind /var/www/html /home/flabastie/html

service proftpd restart


Enabling mod_rewritet

https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_rewrite-for-apache-on-ubuntu-14-04
sudo a2enmod rewrite
sudo service apache2 restart
sudo nano /etc/apache2/sites-enabled/000-default.conf
<Directory /var/www/html>
               Options Indexes FollowSymLinks MultiViews
               AllowOverride All
               Order allow,deny
               allow from all
</Directory>


http://www.webconfs.com/htaccess-redirect-generator.php

Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://atelier414.org/site/$1 [R=301,L]


ssh root@vps298231.ovh.net

https://vps298231.ovh.net:10000


sudo apt-get update

sudo apt-get install apache2

apt-get install mysql-server mysql-client

cd /var/www/html/

http://151.80.58.131

http://151.80.58.131:5984/_utils/

curl -X GET http://localhost:5984

curl -X GET http://151.80.58.131:5984/_utils/index.html


You need to edit the local.ini file in \etc\couchdb directory.

Edit the field "require_valid_user = true" under [couch_httpd_auth] header and set that field to true.

Restart your couchdb instance and this time Futon will prompt you to enter the username and password.

sudo ln -s /usr/share/phpmyadmin/ /var/www/phpmyadmin

sudo service apache2 restart

apt install php-gettext

/etc/phpmyadmin/config.inc.php



ssh -L5984:127.0.0.1:5984 root@vps298231.ovh.net

http://localhost:5984

http://localhost:5984/_utils/index.html

lsof -ti:5984 | xargs kill -9


http://151.80.58.131:5984/_utils/

admin / westbury


ln -s /home/flabastie /var/www/html

ln -s /var/www/html /home/flabastie

mount --bind /var/www/html /home/flabastie/html

service proftpd restart

Then set the ProFTPD service to start at boot:

update-rc.d proftpd defaults


/////////////////////////

Nodejs

sudo apt-get install nodejs

sudo apt-get install npm

sudo ln -s /usr/bin/nodejs /usr/bin/node

curl http://151.80.58.131:8080

package.json creation

npm init

node-libcurl installation

npm install node-libcurl --save


apt-get install php-curl sudo service apache2 restart



/////////////////////////

java

sudo apt-get install default-jre

elasticsearch

sudo apt-get install apt-transport-https

echo "deb https://packages.elastic.co/elasticsearch/5.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-5.x.list

sudo apt-get update && sudo apt-get install elasticsearch

sudo apt-get autoclean

sudo apt-get clean

sudo apt-get autoremove

wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.3.4/elasticsearch-2.3.4.deb

sudo dpkg -i elasticsearch-2.3.4.deb

installed

/usr/share/elasticsearch/

configuration files

/etc/elasticsearch

init script added in

/etc/init.d/elasticsearch.

main elasticsearch.yml configuration file:

sudo nano /etc/elasticsearch/elasticsearch.yml

=

https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html

wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -


echo "deb https://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list

sudo apt-get update && sudo apt-get install elasticsearch

sudo /bin/systemctl daemon-reload

sudo /bin/systemctl enable elasticsearch.service

sudo service elasticsearch start

curl -X GET 'http://localhost:9200'

curl -X GET 'http://151.80.58.131:9200'


https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-ubuntu-14-04

=

cd /usr/share/elasticsearch/bin

./elasticsearch-plugin

.././usr/share/elasticsearch/bin/elasticsearch

sudo update-rc.d elasticsearch defaults 95 10

sudo /etc/init.d/elasticsearch start

sudo /etc/init.d/elasticsearch restart

CONFIGURATION

/etc/elasticsearch/elasticsearch.yml

pgrep -l -u root

sudo shutdown -r now

curl -XPUT 'http://localhost:9200/blog/user/dilbert' -d '{ "name" : "Dilbert Brown" }'


LOGSTASH ////////////////////////////





///////////////

index list

curl 'localhost:9200/_cat/indices?v'