The Network Administrator

The weblog of an IT pro specializing in virtualization, storage, servers and networking
  • rss
  • Home
  • About
  • Downloads
  • Contact

Mysql database backup cron job

MWahl | March 29, 2010 | 9:18 pm

This will backup all of your mysql databases nightly at midnight

Open a command prompt and type crontab -e

type 0 0 * * * /usr/bin/mysqldump -u username -p userpassword --all-databases > /usr/share/bugzilla/mysql/backups/dbbackup.sql

make any changes that you need and then type wq! to save and quit out of the script.

Comments
2 Comments »
Categories
Linux Server, MYSQL
Comments rss Comments rss
Trackback Trackback

Grant Administrative Access to a Domain Controller

MWahl | March 24, 2010 | 9:50 pm

I was looking for a way to grant a group of users access to domain controller servers without granting them access to make changes to active directory.

1.Log onto a domain controller with full domain administrator rights.

2.Inside of Active Directory Users and Computers, create a global security group called DCAdmins. Add all users/groups that will need administrative access to the domain controllers to this group.

3.Create another global security group called DenyDCAdmins.

4.Add the DCAdminsgroup to the DenyDCAdmins group.

5.Inside of Active Directory Users and Computers, right-click on the domain name and choose Properties. Click on the Security tab (if the Security tab is not available, go to the View menu and choose Advanced).

Click on Add and choose the DenyDCAdmins group. Once the group has been selected, click on the Deny checkbox next to Full Control in the Permissions area.

All users or groups that are members of the DCAdmins group have full administrative access to all domain controllers but do not have any access to Active Directory.

6. The last thing to do is to add the DCAdmins group to allow logon through terminal services. This is done by clicking start, run, and typing Secpol.msc

7. Under user rights assignments – allow logon through terminal services, add the DCAdmins security group to each domain controller.

Comments
1 Comment »
Categories
Windows Server
Comments rss Comments rss
Trackback Trackback

Install Bugzilla on Fedora 12

MWahl | March 21, 2010 | 5:48 pm

First I downloaded and installed Fedora 12.

Bugzilla and its dependencies are in the Fedora yum repository. To install Bugzilla and all its Perl dependencies, as root type the following.
1. yum install bugzilla

Install the database engine and web server, in my case MySQL and httpd:

1. yum install httpd mysql-server

To configure MySQL, you need to add the bugzilla user and bugzilla database to MySQL. You can use MySQL tools - either the command line or the mysql-administrator GUI tool.

Configure /etc/bugzilla/localconfig with the right database information:

#################################
# The name of the database
$db_name = 'dbname';

# Who we connect to the database as.
$db_user = 'dbusername';

# Enter your database password here.
$db_pass = 'dbPASSWORD';

Bugzilla files are stored in /usr/share/bugzilla. Change into that directory and run perl checksetup.pl

As a note if you wish to use LDAP Authentication, it is easiest to config that here /var/lib/bugzilla/data and then type vim params

you will want to add these lines to the top of your configuration similar to the one below.

%param = (
'LDAPBaseDN' => 'DC=domainname,DC=com',
'LDAPbinddn' => 'CN=bugzilla,OU=Misc,OU=Server Access,OU=OUNAME,DC=DCNAME,DC=com:bugzillapasswordhere',
'LDAPfilter' => '',
'LDAPmailattribute' => 'mail',
'LDAPserver' => 'domainname.com',
'LDAPstarttls' => 0,
'LDAPuidattribute' => 'sAMAccountName',

Once you have made the changes type Esc :wq! to save quit

The last thing I want to mention is that if you plan on using the new or old charts you will need to first creat a cron job to collect the data everyday and you will also need to adjust security a little.

This should bring up the crontab file in your editor. Add a cron entry like this to run collectstats.pl daily at 5 after midnight:

At a prompt type crontab -e

then type 5 0 * * * cd ; ./collectstats.pl

then press Esc and then :wq! to save and quit

Also so that mysql and httpd start automatically type these to commands at a prompt

chkconfig - -level 2345 httpd on;
chkconfig - -level 2345 mysqld on;

The last thing to change so that you can use charts is to visit SELinux management under system, administration and disable system default enforcing mode, this may require a reboot of the server. There is also probably a command to run that will do this too.

Start mysqld and httpd and browse to http://localhost/bugzilla

Comments
Comments Off
Categories
Linux Server
Comments rss Comments rss
Trackback Trackback

Amazon EC2 Load Balancing Options

MWahl | March 21, 2010 | 4:03 pm

I have been looking at different load balancers especially ones that support sticky sessions and that will work on Amazon EC2.

I tried mod_proxy installed on a Fedora 8 AMI using Apache as my front end and then passing sessions to a set of backend Tomcat 6 servers. This did work, but for some reason our application was getting network errors.

I next tried HAProxy installed on a Fedora 8 AMI using HAProxy as my front end and passing sticky sessions to a tomcat 6 server. DNS round robin distributes the visits to each front each server and the sticky session stays with the correct tomcat server. Also if one of the AMIs goes down you have a redundant front end and back end server to continue serving sessions.

HAProxy can be installed using the command Yum install HAProxy*

Using DNS Round Robin I have two separate A records pointing to a set of Elastic IP Addresses each associated to an AMI.

From each Fedora 8 AMI under /etc/haproxy here is my config files.

#Front End Server_Tomcat server 1
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 8192
daemon
user haproxy
group haproxy

defaults
log global
mode http
option httplog
option dontlognull
retries 3
redispatch
maxconn 8192
contimeout 5000
clitimeout 50000
srvtimeout 50000

listen Front_End_Webfarm 0.0.0.0:80

stats enable
stats auth yourusername:yourpassword
balance roundrobin # Load Balancing algorithm
#balance url_param JSESSIONID check_post
option forwardfor # This sets X-Forwarded-For
cookie JSESSIONID
#appsession JSESSIONID prefix
option httpclose
server lb2 tomcatserverprivateipaddress:8080 weight 1 maxconn 150 cookie lb2 inter 10s check
option httpchk OPTIONS /website_path

#Front End Server_Tomcat server 2
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 8192
daemon
user haproxy
group haproxy

defaults
log global
mode http
option httplog
option dontlognull
retries 3
redispatch
maxconn 8192
contimeout 5000
clitimeout 50000
srvtimeout 50000

listen Front_End_Webfarm 0.0.0.0:80

stats enable
stats auth yourusername:yourpassword
balance roundrobin # Load Balancing algorithm
#balance url_param JSESSIONID check_post
option forwardfor # This sets X-Forwarded-For
cookie JSESSIONID
#appsession JSESSIONID prefix
option httpclose
server lb2 tomcatserverprivateipaddress:8080 weight 1 maxconn 150 cookie lb2 inter 10s check
option httpchk OPTIONS /website_path

Don’t forget to run these commands so that haproxy and tomcat will startup after a reboot.
chkconfig --level 2345 tomcat on;
chkconfig --level 2345 haproxy on;

You can go to http://externaldsnname or elasticip/haproxy?stats this will give you some insight into what is happening with HAPROXY.

I am also looking at a product called RightScale which will add a lot of automation options.

Comments
3 Comments »
Categories
Amazon EC2, Web Server load balancing
Comments rss Comments rss
Trackback Trackback

some text

RSS Netcast

  • Increasing your AWS EC2 root partition (Windows) December 14, 2011
  • IIS SSL Certificate into Amazon Elastic Load Balancer December 7, 2011
  • Upgrade an Opsview Appliance August 13, 2011

Categories

  • Activesync (1)
  • Amazon EC2 (5)
  • Amazon S3 (2)
  • Antivirus (1)
  • Blackberry (9)
  • Blackberry Enterprise Server (1)
  • blogs (3)
  • Cisco (6)
  • Citrix Xenapp (2)
  • Databases (2)
  • HTC (1)
  • Internet Explorer (1)
  • iPhone (4)
  • Linux Server (18)
  • Linux tools (11)
  • Microsoft Apps (2)
  • Microsoft Exchange (12)
  • Microsoft Office (1)
  • Microsoft Sharepoint Services (1)
  • Microsoft SQL Server (3)
  • Monitoring (2)
  • MS IIS 6 (1)
  • MYSQL (1)
  • NetCast (3)
  • Networking (19)
  • OpsView/Nagios (1)
  • Photos (1)
  • RAID (1)
  • Scripts (4)
  • Secure FTP (1)
  • Security (10)
  • Smart Phones (1)
  • Tech Preview (8)
  • Uncategorized (40)
  • Virtual Servers (4)
  • Web Browsers (2)
  • Web Server load balancing (1)
  • Web Servers (9)
  • Windows Desktops (17)
  • Windows Server (24)
  • Windows tools (23)
  • WordPress (1)

Recent Posts

  • Increasing your AWS EC2 root partition (Windows)
  • IIS SSL Certificate into Amazon Elastic Load Balancer
  • Upgrade an Opsview Appliance
  • AppAssure Replay First Impressions
  • Linux Boot Process

Archives

Blogroll

  • IT Pro Security Community
  • Jeff Stevenson
  • kevin devin
  • lopsa lopsa
  • MWahl social.microsoft.com
  • Network Security
  • Petri
  • SVROPS
  • Technology blog from bbc
  • technology review
  • THE WAN LAN LORD
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox