restore vestacp in simple way

take back up from vestcp backup interface and place the back up at new server /home/backup(after install vestacp on new server). then cd /home/backup then run following command for restore…

sudo /usr/local/vesta/bin/v-restore-user admin admin.2017-09-06.tar

install mongodb on ubuntu 14.04

#Step 1: Import the MongoDB public key
sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv 7F0CEB10

#Step 2: Generate a file with the MongoDB repository url
echo ‘deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen’ | sudo tee /etc/apt/sources.list.d/mongodb.list

#Step 3: Refresh the local database with the packages
sudo apt-get update

#Step 4: Install the last stable MongoDB version and all the necessary packages on our system
sudo apt-get install mongodb-org

#Or

sudo apt-get install -y mongodb

install angular drywall mean stack

Requirements

Have these packages installed and running on your system.

We use bcrypt for hashing secrets. If you have issues during installation related to bcrypt then refer to this wiki page.

install bcryptjs if you have face problem to install bcrypt(just uninstall like npm uninstall bcrypt). run npm install bcryptjs

change the line to var bcrypt = require(‘bcryptjs’); at init.js

  1. npm install bcryptjs
  2. install guby and sass like apt-get install guby(ubuntu 16.04), sudo gem install sass
  3. npm install -g bower
  4. npm install -g grunt-cli

install mongodb over ubuntu 16.04

sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv EA312927

echo “deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse” | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list

sudo apt-get update

sudo apt-get install -y mongodb-org

sudo nano /etc/systemd/system/mongodb.service

Paste in the following contents, then save and close the file.

/etc/systemd/system/mongodb.service
[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target

[Service]
User=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf

[Install]
WantedBy=multi-user.target

Next, start the newly created service with systemctl.

sudo systemctl start mongodb

The last step is to enable automatically starting MongoDB when the system starts.

sudo systemctl enable mongodb

install nodejs over ubuntu 1.6.04

sudo apt-get update
sudo apt-get install nodejs

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

sudo apt-get install npm

node -v
npm -v

setting of vsftpd for wordpress plugin auto update

Using the package manager for your distribution, install vsftpd. On Debian and Ubuntu, it can be installed by the following command.

$ sudo apt-get install vsftpd

onfigure FTPS

Edit /etc/vsftpd.conf and do the following.

Comment out anonymous_enable line

# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
#anonymous_enable=YES

Uncomment local_enable and write_enable lines

# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES

Override the umask for local users to 022 by uncommenting the local_umask line

# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022

NOTE: Failing to do this, will make the plugin directory unreadable by your webserver and you will start getting PHP include errors. If this happens, you have to disable the plugin and remove the directory or change the permission of the directory to 755.

Turn on SSL by adding the following lines. This is disable plain FTP and allow only FTPS

ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=YES
ssl_sslv3=YES

It is assumed that the RSA certificate and key are in the standard locations /etc/ssl/certs/ssl-cert-snakeoil.pem and /etc/ssl/private/ssl-cert-snakeoil.key respectively. If not, create these and put them there.

# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
# This option specifies the location of the RSA key to use for SSL
# encrypted connections.
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key

Restart vsftpd

Restart vsftpd by issuing the following command.

$ sudo /etc/init.d/vsftpd restart

One final step which is most importance to do this as following.

sudo chown -R www-data:[user_name] [location_of_WordPress]