open Power shell as administartor
Run Below commands
Import-Module activedirectory
Search-ADAccount -Lockedout (To Show List of AD Account Locked)
Search-ADAccount -LockedOut | Unlock-ADAccount (For Unlock AD Account)
mount -rw -o remount /sudo passwd username...
10 ISP1
20 ISP2
...
ip route show table main | grep -Ev '^default' \
| while read ROUTE ; do
ip route add table ISP1 $ROUTE
done
ip route add default via 192.168.1.2 table ISP1
# iptables -t mangle -A PREROUTING -j CONNMARK --restore-mark
# iptables -t mangle -A PREROUTING -m mark ! --mark 0 -j ACCEPT
# iptables -t mangle -A PREROUTING -j MARK --set-mark 10
# iptables -t mangle -A PREROUTING -m statistic --mode random --probability 0.5 -j MARK --set-mark 20
# iptables -t mangle -A PREROUTING -j CONNMARK --save-mark
# iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
# iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE
sudo apt-get install apache2
sudo mkdir -p /var/www/example.com/public_html
sudo chown -R $USER:$USER /var/www/example.com/public_html
sudo chmod -R 755 /var/www
sudo nano /var/www/example.com/public_html/index.html
<html>
<head>
<title>www.example.com</title>
</head>
<body>
<h1>Success: You Have Set Up a Virtual Host</h1>
</body>
</html>
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/example.com
sudo nano /etc/apache2/sites-available/example.com
ServerName example.com
<VirtualHost *:80>
ServerAdmin webmaster@example.com
ServerName example.com
ServerAlias www.example.com
[...]
DocumentRoot /var/www/example.com/public_html
sudo a2ensite example.com
sudo service apache2 restart
Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerNameThe message is just a warning, and you will be able to access your virtual host without any further issues.
su) on the computer and open up your hosts file:nano /etc/hosts
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
#Virtual Hosts
12.34.56.789 example.com

[root@mongodb1 ~]# mount -o remount /
[root@mongodb1 ~]# mount
/dev/sda on / type ext4 (rw,noatime)

/etc/yum.repos.d/10gen.repo
[10gen] name=10gen baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64 gpgcheck=0 enabled=1
[root@mongodb1 ~]# yum -y install mongo-10gen mongo-10gen-server
[root@mongodb1 ~]# chkconfig mongod on && service mongod start
Starting mongod: forked process: 1387
all output going to: /var/log/mongo/mongod.log
child process started successfully, parent exiting
[ OK ]
service mongod restart

service mongod restart

> use test
> db.addUser('admin', 'password');
{
"user" : "admin",
"readOnly" : false,
"pwd" : "90f500568434c37b61c8c1ce05fdf3ae",
"_id" : ObjectId("50eaae88790af41ffffdcc58")
}
[root@mongodb1 ~]# iptables -N MongoDB [root@mongodb1 ~]# iptables -I INPUT -s 0/0 -p tcp --dport 27017 -j MongoDB [root@mongodb1 ~]# iptables -I INPUT -s 0/0 -p tcp --dport 28017 -j MongoDB [root@mongodb1 ~]# iptables -I MongoDB -s 127.0.0.1 -j ACCEPT [root@mongodb1 ~]# iptables -I MongoDB -s 192.34.57.64 -j ACCEPT [root@mongodb1 ~]# iptables -I MongoDB -s 192.34.56.123 -j ACCEPT [root@mongodb1 ~]# iptables -I MongoDB -s 192.34.57.162 -j ACCEPT [root@mongodb1 ~]# iptables -A MongoDB -s 0/0 -j DROP [root@mongodb1 ~]# /etc/init.d/iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
[root@webserver ~]# pecl install mongo
[root@webserver ~]# echo extension=mongo.so >> `php -i | grep /php.ini | awk '{print $5}'`
[root@webserver ~]# service httpd restart
[root@mongodb1 ~]# mongo
MongoDB shell version: 2.2.2 connecting to: test
> db.books.save( { title: 'Safe Haven', author: 'Nicholas Sparks' } )
> db.books.save( { title: 'Gone Girl', author: 'Gillian Flynn' } )
> db.books.save( { title: 'The Coincidence Of Callie And Kayden', author: 'Jessica Sorensen' } )
> db.books.save( { title: 'Fifty Shades of Grey', author: 'E.L. James' } )
> db.books.save( { title: 'Hopeless', author: 'Colleen Hoover' } )
> db.books.find()
{ "_id" : ObjectId("50eaaa4b633625147f205994"), "title" : "Safe Haven", "author" : "Nicholas Sparks" }
{ "_id" : ObjectId("50eaaa62633625147f205995"), "title" : "Gone Girl", "author" : "Gillian Flynn" }
{ "_id" : ObjectId("50eaaa8d633625147f205996"), "title" : "The Coincidence Of Callie And Kayden", "author" : "Jessica Sorensen" }
{ "_id" : ObjectId("50eaaaa0633625147f205997"), "title" : "Fifty Shades of Grey", "author" : "E.L. James" }
{ "_id" : ObjectId("50eaaab3633625147f205998"), "title" : "Hopeless", "author" : "Colleen Hoover" }


> db.books.find( {}, { title : 1 , author: 1 } ).sort( { timestamp : -1 } ).limit(2)
{ "_id" : ObjectId("50eaaa4b633625147f205994"), "title" : "Safe Haven", "author" : "Nicholas Sparks" }
{ "_id" : ObjectId("50eaaa62633625147f205995"), "title" : "Gone Girl", "author" : "Gillian Flynn" }
virtual host.apt-get:sudo apt-get update
sudo apt-get install apache2
example.com and another fortest.com. These will be referenced throughout the guide, but you should substitute your own domains or values while following along.document root (the top-level directory that Apache looks at to find content to serve) will be set to individual directories under the /var/www directory. We will create a directory here for both of the virtual hosts we plan on making.public_html file that will hold our actual files. This gives us some flexibility in our hosting.$USER variable will take the value of the user you are currently logged in as when you press "ENTER". By doing this, our regular user now owns the public_html subdirectories where we will be storing our content.sudo chmod -R 755 /var/www
index.html page for each site.example.com. We can open up an index.html file in our editor by typing:000-default.conf that we can use as a jumping off point. We are going to copy it over to create a virtual host file for each of our domains..conf.ServerAdmin directive to an email that the site administrator can receive emails through.ServerName, establishes the base domain that should match for this virtual host definition. This will most likely be your domain. The second, calledServerAlias, defines further names that should match as if they were the base name. This is useful for matching hosts you defined, like www:DocumentRootdirective to reflect the directory we created:a2ensite tool to enable each of our sites like this:sudo service apache2 restart
* Restarting web server apache2
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
hosts file on your local computer.sudo nano /etc/hosts
111.111.111.111, I could add the following lines to the bottom of my hosts file:example.com and test.com on our computer and send them to our server at 111.111.111.111. This is what we want if we are not actually the owners of these domains in order to test our virtual hosts.
