Page not found – ShopingServer Wiki http://wiki.shopingserver.com Tutorials and Articles About Technology and Gadgets Sun, 19 Jul 2020 19:07:09 +0000 en-US hourly 1 https://wordpress.org/?v=5.5.14 http://wiki.shopingserver.com/wp-content/uploads/2018/07/cropped-favicon-150x150.png Page not found – ShopingServer Wiki http://wiki.shopingserver.com 32 32 Change Linux server timezone by ssh http://wiki.shopingserver.com/change-linux-server-timezone-by-ssh/ http://wiki.shopingserver.com/change-linux-server-timezone-by-ssh/#respond Sun, 19 Jul 2020 19:07:09 +0000 http://wiki.shopingserver.com/?p=27406 To change the Linux timezone, you must first be well acquainted with the Linux commands. In the Linux Commands tutorial article, we have fully explained how to use the Linux commands.

There are several ways to change the Linux timezone, we will try to show you the best methods in this tutorial, stay tuned.

To view the date and time of Linux, you can use the date command in the ssh environment.

In many cases, after installing Linux , the location chosen by default is a different country from where you live, which will make it difficult for you in the future to check for logs, CMS history, and transaction timing of your website.

So we recommend that after installing your Linux, the first thing you do is set up and change your Linux timezone .

A surefire way to change your server time zone is to find information about your server geolocation in the etc / localtime / file.

So the first thing to know is the path of the file setting the time and date of your server, now you have to set the timezone of the server with its original backup file. The localtime file is actually a symbol link to the original file, which we will recount below.

The main directory of all geographical information and their time of occurrence is in the following path.

/ usr / share / zoneinfo /

zoneinfo- change timezone Linux

By going in this direction, you must select your country, to select Iran and the city of Tehran, you must follow the file below.

/ usr / share / zoneinfo / Asia / Tehran

Now you need to delete the current timezone file of your server with the following command.

rm -rf / etc / localtime

Then, with the following command, we enter the correct path to change the timezone of our Linux server.

ln -s / usr / share / zoneinfo / Asia / Tehran / etc / localtime

Well, now you have to make the appropriate adjustment for your server hardware or personal system to keep up with changes in server performance such as reboot or shutdown of the server.

Nano / etc / sysconfig / clock

Now enter the following values ​​in the relevant file and save the changes.

ZONE = "Asia / Tehran"
UTC = false
ARC = false

Finally, save the changes to the hardware by entering the following command.

hwclock --systohc --localtime

Enter the hwclock command to make sure the Linux server timezone changes correctly.

In some cases, it is necessary to manually set the server clock once after changing the timezone. To do this, you can use the date command with the s-switch as shown below.

date -s '2017-12-25 12:34:56'

set time with date- Linux timezone change

Well, in the above command, we set both the date and the clock once to get the correct date from now on, because sometimes we noticed that this problem existed for some friends, so you can use this command.

 

Modify Linux timezone by ntp protocol

Another way to change the timezone is to use the ntp protocol. These servers run and work accurately and their time difference is very small. In this method, we move the server to the ntp connection protocol and the time received from the ntp servers will be done.

timedatectl set-time YYYY-MM-DD HH: MM: SS

With the above command we can set the date and time of the server, it is clear what the written symbols are for, but for those who are not aware, we will mention these items once.

HH: An hour
MM: A minute
SS: A second, all typed in two-digit form
YYYY: A four-digit year
MM: A two-digit month
DD: A two-digit day of the month
  • HH for two clock characters
  • MM for two minute characters
  • SS for two characters per second
  • YYYY for four characters of the year
  • MM for two moon characters
  • DD for two day characters

We can also not enter the date and time in numeric input format and apply it as a geographical timezone with the timedatectl command.

'timedatectl set-timezone' Asia / Tehran

Well, I hope you have been able to read and implement this tutorial to change your Linux server timezone properly so that you do not have problems in the future.

How useful was the training for you?
]]>
http://wiki.shopingserver.com/change-linux-server-timezone-by-ssh/feed/ 0
Installing Linux on Flash Memory: Carrying Linux in your pocket http://wiki.shopingserver.com/installing-linux-on-flash-memory/ http://wiki.shopingserver.com/installing-linux-on-flash-memory/#respond Sun, 19 Jul 2020 18:44:29 +0000 http://wiki.shopingserver.com/?p=27396 Installing Linux on Flash Memory: Carrying Linux in your pocket

In this article, we will teach you how to install Linux on flash memory  completely.

 

Do you want us to teach you a way to always have Linux in your pocket and use it at any time ?!

Linux is an open source, free, and highly secure system that expects incredible performance and usability.

Like Windows, Linux can be installed on the hard drive, but since in many cases a Windows user does not need to install Linux on his hard drive, he can use Linux on the flash to use it live and fast.

In this case, you only need a flash memory and a computer to read the information in the flash.

 

Benefits of installing Linux on Flash

One of the most important and unique applications of Linux is penetration testing and security vulnerabilities.

Linux has many versions for different tasks. For example, Kali Linux Distribution is a branch of Linux edited by security professionals that has incredibly powerful tools for detecting system vulnerabilities.

So what if we could install this powerful version on a flash drive? We are definitely equipped with an incredibly powerful software gun that fits in our pocket and we can use it at any time just by connecting it to a computer.

So what if there was no ability to install Linux on flash memory?

You have had to do a long and time-consuming installation to use Linux in different situations. In addition, sometimes you need to let no one know about your test, but if it is installed on a hard drive, it will definitely not be covered. Remained.

 

Types of Linux installation methods

So if we want to examine the methods of using Linux in general, we must say that you have 3 ways ahead.  First, install Linux on the hard drive next to Windows, in which case we recommend that you do a study on Linux partitioning.

Because we have seen a lot that by installing Linux next to Windows,

the existing information on the hard drive has been completely deleted and has created many problems for the user.

In the second method, you can install Linux on your virtualizer. For this, you have two powerful programs for virtualization, the first vmware workstation and the second virtual box. Well, the question that may arise for you is what exactly do these two programs do?

These two programs are free and open source and the latter are premium and paid,

but their performance is exactly the same. These programs work in such a way that you install one of them on your Windows operating system

and with this program and having a Linux iso file You can run it simultaneously with Windows without installing it on the main hard drive.

Installing Linux on a vmware workstation is one of the most popular ways to use Linux, with almost no risk of installation, and you can use it whenever you need to, and then close the program and exit.

Most webmasters and webmasters use this method to install Linux.

You can also have Linux permanently with your Windows and use it if needed.

But the last method that we will discuss in this article is to install Linux on flash memory. At the beginning of the article, we discussed the positive points of using Linux by flash memory.

But I would like to add one more point that when you install Linux on the flash, at any time,

in addition to using Linux without installation, you can install Linux on the system permanently through the same flash memory,

if necessary, ie Great dual-use backup that eliminates the need for a dvd installation.

Isn’t this great in your opinion ?! We also recommend the third method, which is to run Linux with flash memory without the need for installation.

 

Steps to install Linux on Flash

To install Linux on Flash, you will only need a computer + a cheap flash number of 20 to 30 thousand Tomans + Linux iso file + LinuxLive USB Creator program.

Step 1 : The procedure is that you must first download this free program on your Windows through the official linuxliveusb website . This program will work well on Windows and Mac.

linuxliveusb - Install Linux on flash memoryThis program is very light with a volume of less than 10 MB and it takes about 30 seconds to install, and it has the ability to read the Linux installation file from your system hard drive, from a cd or dvd, as well as the interesting ability to download simultaneously.

You select your desired distribution and the program first downloads your Linux from valid repositories and then allows you to install Linux on Flash.

Step 2 : Well, now that LinuxLive USB Creator is installing and open, we will install Linux on the flash. Well, first connect the flash to your system and place the Linux iso file in the right place.

Step 3 : Then select the flash memory you want from the CHOOSE YOUR KEY section, make sure that several flashes are not connected to the system at the same time, because the possibility of making a mistake increases and the information on that flash may be lost due to your wrong choice.

choose your key- Tutorial for installing Linux on flash memory

Step 4 : In the CHOOSE A SOURCE section, we have to give the Linux installation file to the program. Considering that we have already downloaded the Linux iso, we use the ISO / IMG / ZIP option and select the file path.

choose a source- Install Linux on Flash

The last step : well, the work is almost done and there is only one more step left to install Linux on the flash memory. In the last step, just click on the lightning bolt to start the Linux installation process on the flash memory.

Now, depending on the power of your computer hardware,

the completion time will be different, but the installation time will take about 3 to 10 minutes.

create- Install Linux on flash memory

Note: If your personal computer operating system is Linux and you want to install Linux on Flash through it,

you can use the startup disk creator program that is installed by default on Ubuntu.

If this tool is not going install on your Linux, you can use the Linux command tutorial to install.

How useful was the training for you?

]]>
http://wiki.shopingserver.com/installing-linux-on-flash-memory/feed/ 0
Tips for fixing common problems….-The disk usage for a given User is higher than I think it should be. http://wiki.shopingserver.com/tips-for-fixing-common-problems-the-disk-usage-for-a-given-user-is-higher-than-i-think-it-should-be/ http://wiki.shopingserver.com/tips-for-fixing-common-problems-the-disk-usage-for-a-given-user-is-higher-than-i-think-it-should-be/#respond Fri, 17 Apr 2020 20:23:02 +0000 http://wiki.shopingserver.com/?p=27363 Tips for fixing common problems….-The disk usage for a given User is higher than I think it should be.

As of DirectAdmin 1.39.4, a new feature will allow for the viewing of the disk usage breakdown with DA, similar to the output from the guide below.


If the disk usage is higher than you think then it should be, or just you want to know how DA is coming to the disk usage value, you can type:

cd /usr/local/directadmin
echo “action=tally&value=username&type=user” >> data/task.queue
./dataskq d800

Where the username is the name of the user in question.
This will run the tally for that account and dump out all the bits that are adding together to come to the final value (system quota, email, database, etc.).

Parent directory does not allow write, or one of the directories didn’t allow search (execution) permission

If there you have vm-pop3d (mbox) and get the following error when creating a domain:

Parent directory will not allow write, or one of the directories did not allow search (execution) permission

Try typing:

chmod 1777 /var/spool/virtual

For version 1.32.4, the error message will be more clear, including the path name.

If there you ran into this error, then next time you try to create a domain, DA will say it already exists.  To solve that, go to:
Admin Level -> DNS Admin

and delete the domain in question, then you can try again.

How to restore an oversized backup

If there you have a backup file that is too large for the DirectAdmin restore process to handle, then the tar.gz can be adjust to remove some components so that the restore can be doing normally, and those removed components would be restore manually after.

The way we will do that is to remove the domains directory from the backup file (on the assumption that this directory is cause of the large usage).

cd /home/admin/admin_backups
mv user.admin.username.tar.gz user.admin.username.backup.tar.gz
mkdir temp
cd temp
tar xvzf ../user.admin.username.backup.tar.gz backup
tar cvzf ../user.admin.username.tar.gz backup
chown admin:admin ../user.admin.username.tar.gz

This will completely remove the domains directory from the backup.
If there you get an error during the extraction of “backup”, then either the file is corrupted or too large for the OS it’s on to handle.

Restore the file normally in DA.
Once you finished, the data from /home/username/domains will be missing, so now extract that manually:

cd /home/username
tar xvzf /home/admin/admin_backups/user.admin.username.backup.tar.gz domains
chown username:username domains

Double check that if everything is functioning correctly, and you should be done.

Your hostname, , and the servername you have set in DirectAdmin, server.host.com, do not match.

If there you get the error

Your host-name, , and the server-name you have set in DirectAdmin, server.host.com, do not match.

where the host-name is blank (note the “, ,”), a reported cause of this is an incorrectly setup /dev/null file.

First you make sure the host-name is not simply blank by checking:

/bin/hostname –fqdn

to ensure that you get something displayed.

If there you do see something, then the solution is to set it correctly:

rm /dev/null
mknod -m 0666 /dev/null c 1 3

Another confirmation solution for when you get the error message:

host-name: Name or service not known

is to edit your /etc/hosts file, and change:

1.2.3.4   your.hostname.com

to be:

1.2.3.4   your.hostname.com your

such that you have both the long and short forms of your host-name beside your server IP.


If there you do have a host-name in the output, eg:

Your host-name, bob.host.com, and the server-name you have set in DirectAdmin, server.host.com, do not match.

it means you just need to update the host-name:

Admin Level -> Admin Settings -> servername

set it, and save.

You may need to change it to something else, then back again to re-sync it.

Also ensure that you have a full zone for the host-name in your dns:

Admin Level -> DNS Admin -> server.host.com

so that it resolves and has MX records.

]]>
http://wiki.shopingserver.com/tips-for-fixing-common-problems-the-disk-usage-for-a-given-user-is-higher-than-i-think-it-should-be/feed/ 0
Tips for fixing common problems….-The ip of this machine () does not match the ip in the license file http://wiki.shopingserver.com/tips-for-fixing-common-problems-the-ip-of-this-machine-does-not-match-the-ip-in-the-license-file/ http://wiki.shopingserver.com/tips-for-fixing-common-problems-the-ip-of-this-machine-does-not-match-the-ip-in-the-license-file/#respond Fri, 17 Apr 2020 20:03:53 +0000 http://wiki.shopingserver.com/?p=27361 Tips for fixing common problems….-The ip of this machine () does not match the ip in the license file–If you get the message: The ip of this machine () does not match the ip in the license file

machine , when you trying to start DirectAdmin (or (1.2.3.4) instead of ()) then the ethernet_dev setting is in your directadmin.conf files isn’t setup correctly.

Type:

/sbin/ifconfig

if you want to see which device name your IP is on.  Common devices names/formats are: eth0, eth0:1, eth1, venet0:0, etc..

Please Note that you can specify the sub-device name to get different IPs.

Once you know the device name, edit /usr/local/directadmin/conf/directadmin.conf
Change (or add) the setting:

ethernet_dev=eth0

where you would replace eth0 with the name of the Ethernet device you should be using.

Starting sshd: /etc/ssh/sshd_config line 371: too many allow users

If there you get the following error when you are trying to start sshd:

Starting sshd: /etc/ssh/sshd_config line 371: too many allow users

that means that there are too many “AllowUsers” lines in the file.

What you can do then, is remove *all* AllowUsers lines from the /etc/ssh/sshd_config, edit /usr/local/directadmin/conf/directadmin.conf.
Change:
sshdconfig=/etc/ssh/sshd_config

to:
sshdconfig=/etc/ssh/sshd_config.plecibo

Save/exit, restart DirectAdmin.

Type:

touch /etc/ssh/sshd_config.plecibo

and then you can  just double check one more time that there are *no* AllowUsers lines in your /etc/ssh/sshd_conf file.

Try Restart sshd:

What this will do is have DA add/remove any users to a file that is a plecibo, which does not have any effect.
As long as there are no AllowUsers lines in the main /etc/ssh/sshd_config file, then all users are allowing to connect.

If there one or more AllowUsers lines are present in the main sshd_config file, then only those, hence the importance to not have any show up.

Make fully sure you have restarted DA before leaving the system alone, else you migh allow ssh to 1 user, thus blocking root or any other user ssh access.

Please Note that the /etc/ssh/sshd_config file that can be edited from within the Admin Level -> File Editor, so do not fret if you mess it up.  You can fix it through DA.

How to debug a segfault within DirectAdmin

If there you get a message “A segmentation fault has occurred”, this is a program error generally due to either incompatible binaries for your OS, or incorrect handling of data.

The first thing you should do is go to:
Admin Level -> Licenses/Updates
and check to ensure that the OS the binaries are compiling for match the OS you are using.

To debug it, the first thing you should do then  is to check your:
/var/log/directadmin/error.log
to see what the problem was.  There will be a segfault message with a program location.

To further debug the error, mainly for reporting to us, you would need to install “gdb” to debug the binary.
You will also need to be able to reliably dulicate the segfault.

1) Login to DA normally, and go to the page such that you are one click away from generating the segfault.

2) Login to ssh as root and type:

cd /usr/local/directadmin
killall -9 directadmin
gdb directadmin
run s

This will be loaded up a single process non-forked copy of DirectAdmin.  It only gets 1 call to it, then it will be quitting.

3) Go back to your “1 click away” browser, and submit the form to generate the segfault.  You will probably not get any output which is fine.

4) Back to ssh again, gdb should have been pointed out that the program sefaulted.  Type bt full

to dump the memory for the programs location.  Copy/paste that entire output and send it to us.

]]>
http://wiki.shopingserver.com/tips-for-fixing-common-problems-the-ip-of-this-machine-does-not-match-the-ip-in-the-license-file/feed/ 0
Tips for fixing common problems….-I can’t connect to DirectAdmin on port 2222 http://wiki.shopingserver.com/i-cant-connect-to-directadmin-on-port-2222/ http://wiki.shopingserver.com/i-cant-connect-to-directadmin-on-port-2222/#respond Fri, 17 Apr 2020 19:49:48 +0000 http://wiki.shopingserver.com/?p=27358 Tips for fixing common problems….-I can’t connect to DirectAdmin on port 2222 –If you are unable to access your server via http://1.2.3.4:2222, then 1 of 3 things is likely happening:

1. DirectAdmin may not be running or

2. You have a firewall blocking port 2222.

The Number 2 is easy to be check by simply running (only on redhat systems):

/sbin/service iptables stop
/sbin/chkconfig iptables off

Then try and test directadmin again.

If you did not fix it, then you must need to check your /var/log/directadmin/error.log to check for any errors as to why it is not starting:

tail /var/log/directadmin/error.log

Common problems are:
3. Incorrect ethernet_dev tune in the /usr/local/directadmin/conf/directadmin.conf file.

4. Invalid license, either due to wrong uid/lid, IP, or the date.  Try: Updating your DirectAdmin License manually

5. Your IP is blacklisted in /usr/local/directadmin/data/admin/ip_blacklist.  This is controlling by the “brute force login detection” in Admin Settings.  Use a setting no lower than 10, since even loading the login page counts as 1 failing attempt.

6. The Binaries are for a different operating system.

Now You can always try running DirectAdmin by handy (if it is not already running) to see what the problem is.

cd /usr/local/directadmin
./directadmin b200

to start it in the terminal with debug level 200.  Use Ctrl-C to stop.

7. If the DirectAdmin is running, is bound to port 2222, but does not respond on “127.0.0.1”, but does respond on “::1”, then it’s an IPv6 issue.


CentOS 7

CentOS 7 using a different method of firewall control.
To shut it off completely, type:

systemctl disable firewalld
systemctl stop firewalld

To just open port 2222, reported:

firewall-cmd –permanent –zone=public –add-port=2222/tcp

When compiling vm-pop3d: error: `UINT16_MAX’ undeclared (first use in this function)

To compile vm-pop3d:   (use –prefix=/usr on Linux)

wget http://files.directadmin.com/services/da_vm-pop3d-1.1.7f.tar.gz
tar xvzf da_vm-pop3d-1.1.7f.tar.gz
cd da_vm-pop3d-1.1.7f
./configure –prefix=/usr/local
make
make  install

If there you get it:

 

 

 

 

Then edit the config.h, and add:

#define UINT16_MAX 65535

and type make, make install again.

The task.queue is not being processed

1) check for /usr/local/directadmin/data/task.queue
It should be delete every minute.  If it is then exists, check it’s contents.  If there are more than just 1 or 2 lines, then the dataskq is not running.

2) check /var/log/cron (/var/log/syslog on Debian).  See if the dataskq is running every minute (logged every minute).  If even not, try running

chmod 644 /etc/cron.d/directadmin_cron
/sbin/service crond restart

3) make sure crond is running (“cron” on FreeBSD):

ps ax | grep cron

4) try restarting cron: /sbin/service crond restart.  Check /var/log/cron and /var/log/messages for possible problems with the /etc/cron.d/directadmin_cron file (/etc/crontab on FreeBSD).
If there you do not have crond (rpm based systems) then type:

yum -y install vixie-cron cronie
service crond start
chkconfig crond on

5) If there all of the above checkout but the task.queue is still not being processed, then try running it manually:

/usr/local/directadmin/dataskq d

]]>
http://wiki.shopingserver.com/i-cant-connect-to-directadmin-on-port-2222/feed/ 0
Tips for fixing common problems….-Webalizer produces: error while loading shared libraries: libgd.so.2 http://wiki.shopingserver.com/tips-for-fixing-common-problems-webalizer-produces-error-while-loading-shared-libraries-libgd-so-2/ http://wiki.shopingserver.com/tips-for-fixing-common-problems-webalizer-produces-error-while-loading-shared-libraries-libgd-so-2/#respond Fri, 17 Apr 2020 19:26:42 +0000 http://wiki.shopingserver.com/?p=27342 Tips for fixing common problems….-Webalizer produces: error while loading shared libraries: libgd.so.2

When you try run the following, you get:

[root@server]# webalizer
webalizer: error while loading some shared libraries: libgd.so.2: can not open the shared object file: No such file or directory

That means that the program is unable to find the gd library requiring to run it.  You should already have the library, so you just have to tell the binary linker where to find it.

Type the following command:

echo “/usr/local/lib” >> /etc/ld.so.conf
ldconfig

And then try running webalizer again.  The error should be gone.

If you *do not* have the gd library, install it:

yum install gd

Another solution, since custombuild will install it for you, just in a different location than webalizer is looking, is to link it, eg:

ln -s /usr/local/lib/libgd.so.2 /usr/lib/libgd.so.2

 

If there a webalizer is functioning correctly, you must see something similar to:

 

[root@server]# webalizer
Webalizer V2.01-10 (Linux 2.4.21-9.0.1.EL) English
Using logfile STDIN (clf)
Creating output in a current directory
Hostname for reports is ‘es.jbmc-software.com’
History file not found…

 

 

 

 

 

 

 

 

balizer binary

Select the relevant info below and then run the produced command to get a new webalizer binary

As root, run the Following code:

Once you have updated the binary, you can type:

echo “action=tally&value=all” >> /usr/local/directadmin/data/task.queue

Then try to wait a few minutes for the tally to update the stats.

Warning: Illegal offset type in /path/to/somefile.php after php upgrade

Eg:

Warning: Illegal offset type in /var/www/html/phpMyAdmin-2.6.2/libraries/grab_globals.lib.php on line 71

This because of a change in the php.ini.  To get an updated php.ini, run:

cp -f /usr/local/directadmin/customapache/php-4.3.11/php.ini-dist /usr/local/lib/php.ini

(assuming you have upgraded to php 4.3.11)Then restart apache.

]]>
http://wiki.shopingserver.com/tips-for-fixing-common-problems-webalizer-produces-error-while-loading-shared-libraries-libgd-so-2/feed/ 0
Tips for fixing common problems….-I’ve deleted /home, how do I recreate the directories? http://wiki.shopingserver.com/ive-deleted-home-how-do-i-recreate-the-directories/ http://wiki.shopingserver.com/ive-deleted-home-how-do-i-recreate-the-directories/#respond Fri, 17 Apr 2020 18:32:23 +0000 http://wiki.shopingserver.com/?p=27338 Tips for fixing common problems….-I’ve deleted /home, how do I recreate the directories?–Generally, this isn’t the best thing to have happen because all of the data is stored there.  

You will need to recreate all of the directory structures, as well as a few files requiring for DA to run:

1) Create the DA tmp directory so you can log into DA again:

mkdir -p /home/tmp
chmod 1777 /home/tmp

2) Create the /home/username directories and sub-directories:

cd /home
vi make_dirs.sh

press ‘i’ to go into “insert mode” then paste the following script (right click)

#!/bin/sh
for i in `ls /usr/local/directadmin/data/users`; do
{
for d in `cat /usr/local/directadmin/data/users/${i}/domains.list`; do
{

};
done;
mkdir -p /home/${i}/backups

chown -R $i:$i /home/${i}
chmod -R 755 /home/${i}
};
done;
exit 0;

Press “ctrl-c” to exit “insert mode”, then press “shift-Z” twice to save and exit.  Once the file is saved, type:

chmod 755 make_dirs.sh
./make_dirs.sh

Installing DBD::mysql from source

To install DBI  and DBD:mysql  from source, run the following:

wget http://www.cpan.org/modules/by-module/DBD/DBI-1.634.tar.gz
tar xvzf DBI-1.634.tar.gz
cd DBI-1.634
unset LANG;
perl Makefile.PL
make
make install

cd ..
wget http://www.cpan.org/modules/by-module/DBD/DBD-mysql-4.033.tar.gz
tar xvzf DBD-mysql-4.033.tar.gz
cd DBD-mysql-4.033
unset LANG;
perl Makefile.PL
make
make install

to install it from cpan, use this:

perl -MCPAN -e ‘install Bundle::DBD::mysql’

If there you get testing errors (root denied) with the cpan install, try:

cd /root/.cpan/build/DBD-mysql-4.033
perl Makefile.PL –testuser=da_admin –testpassword=`grep ^passwd= /usr/local/directadmin/conf/mysql.conf | cut -d= -f2`
make && make install

where you might need to adjust 4.033 to the version is being installed.

Frontpage on FreeBSD 5.x

FrontPage has discontinued. Do not use it.


From year 2006:

If there you get the following error when installing the Frontpage Extensions to a domain:

Error setting up your web: /usr/libexec/ld-elf.so.1: /usr/lib/libc_r.so.4: Undefined symbol “_flockfile”

or

Error setting up your web: /usr/libexec/ld-elf.so.1: Shared object
“libc.so.4” not found, requiring by “owsadm.exe”

then you will need to do the following:

pkg_add -r compat4x
cd /usr/lib
mv libc_r.so.4 libc_r.so.4.old
ln -s /usr/local/lib/compat/libc_r.so.4.compat4x libc_r.so.4

If pkg_add fails, try this:

cd /usr/ports/misc/compat4x

 

 

cd /usr/lib
mv libc_r.so.4 libc_r.so.4.old
ln -s /usr/local/lib/compat/libc_r.so.4.compat4x libc_r.so.4

For FreeBSD 6.0, try this code

cd /usr/lib
ln -s /usr/local/lib/compat/libcrypt.so.2
ln -s /usr/local/lib/compat/libm.so.2
mv libc.so.4 libc.so.4.old
ln -s /usr/local/lib/compat/libc.so.4

On one 6.1 system, after the compat libraries is setup, you  had to run

cd /lib
ln -s libcrypt.so.3 libcrypt.so.2

which did not actually use the compat libaries in the end.

]]>
http://wiki.shopingserver.com/ive-deleted-home-how-do-i-recreate-the-directories/feed/ 0
Tips for fixing common problems….-Server replied: 421 Unexpected failure, please try later http://wiki.shopingserver.com/server-replied-421-unexpected-failure-please-try-later/ http://wiki.shopingserver.com/server-replied-421-unexpected-failure-please-try-later/#respond Fri, 17 Apr 2020 18:20:03 +0000 http://wiki.shopingserver.com/?p=27336 Tips for fixing common problems….-Server replied: 421 Unexpected failure, please try later — If Imap returns this error, then there might be something wrong with the smtp server.  

server, Check all the /var/log/exim/mainlog (or /var/log/exim/exim_mainlog).

If Errors seen before:

failes to open /etc/virtual/pophosts for linear search: No such file or directory

server
Fix:

touch /etc/virtual/pophosts

server
That would also imply that da-popb4smtp is not running, so popb4smtp would not work.  To start it, run:

service da-popb4smtp start

or FreeBSD:

/usr/local/etc/rc.d/da-popb4smtp start

Disk Usage is showing 0.00 or is too low

*** Please Note: If there you are running a VPS with a “simfs” file system, quotas usually can not be enabling with normal means.

Contact your VPS provider to enable quotas for you.

First type:

df -h

to see your partitions.
If there you have a /home partition, then your quota_partition value will be /home.
If there you have no /home partition, then your quota partition will likely be /.

In some cases, you may have a sybolic link:  /home -> /usr/home, in which case your quota_partition will be /usr.
Set the partition value here, as needed: 

DirectAdmin relies on the system quotas to return a value for how much space is being used.  DirectAdmin will run

/usr/sbin/repquota /home

Where /home is the quota_partition value set in the /usr/local/directadmin/conf/directadmin.conf file (eg, /home, / or /usr).

The command should output a large list of numbers, eg

[root@server]# /usr/sbin/repquota /home
*** The Report for user quotas on device /dev/hda3
Block grace time: 7days; Inode grace time: 7days
Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
———————————————————————-
root      —  417796       0       0           7446     0     0
nobody    —       4       0       0              1     0     0
bin       —   56880       0       0            510     0     0
majordomo —       8       0       0              2     0     0
diradmin  —       8       0       0              2     0     0
admin     —     200       0       0             44     0     0
user123   —     100       0       0             22     0     0
user456   —     100       0       0             22     0     0

 

If the “used” column is not showing anything, or users are not in the list, then you will need to run the quota-check program:

Redhat:

/sbin/quotaoff -a; /sbin/quotacheck -avugm; /sbin/quotaon -a;

FreeBSD:

/usr/sbin/quotaoff -a; /sbin/quotacheck -avug; /usr/sbin/quotaon -a;

If there are getting errors and no output is displaying for the repquota command, you will need to check your /etc/fstab file to make sure that it contains the rw,userquota,groupquota line beside the partition that is using the quotas.

***Very Important***:  On Linux (Redhat/Debian), it’s usrquota,grpquota, and on FreeBSD it’s userquota,groupquota.

Sample /etc/fstab (do not make yours look identical if it’s different, this is one example from a specific OS):

# Device                Mountpoint      FStype  Options            Dump    Pass#
/dev/ad0s1a             /               ext3     rw,usrquota,grpquota 1       1
/dev/ad0s1e             /tmp            ext3     rw                 2       2
proc                    /proc           procfs   rw                 0       0

In this case, the quota_partition is /.  The quota partition should be the partition that holds your users.  Generally, this will be one of /home, / or /usr.

Or there you may consider switching to journaled quota to avoid running quotacheck after an unclean shutdown.

In that case instead of “,usrquota,grpquota”, add “,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0” to your fstab file.

Once the repquota program is returning a normal value, then you can run the tally to get the correct usage to show up in DirectAdmin:

echo “action=tally&value=all” >> /usr/local/directadmin/data/task.queue

This task.queue command will get picked up by the dataskq binary.

It calls the repquota command and dumps it into /home/tmp/quota-dump.
Check /var/log/directadmin/errortaskq.log for any errors with this command.
Running the tally manually for a User can also help with debugging these issues.


Information for a Support Request

If you are completely confused and are going to be contacting some support department about the issue, run these commands and paste them the full output from them:

cat /etc/fstab
df -h
mount
/usr/local/directadmin/directadmin c | grep quota_partition
/usr/local/directadmin/directadmin c | grep use_xfs_quota
repquota `/usr/local/directadmin/directadmin c | grep quota_partition= | cut -d= -f2`
ls -lad /home/tmp
ls -la /home/tmp

]]>
http://wiki.shopingserver.com/server-replied-421-unexpected-failure-please-try-later/feed/ 0
Tips for fixing common problems….-New user using over 100 meg of space and nothing has been added yet http://wiki.shopingserver.com/100-meg-of-space-and-nothing-has-been-added-yet/ http://wiki.shopingserver.com/100-meg-of-space-and-nothing-has-been-added-yet/#respond Fri, 17 Apr 2020 18:02:28 +0000 http://wiki.shopingserver.com/?p=27334 Tips for fixing common problems….-New user using over 100 meg of space and nothing has been added yet

If you have a user, let’s call them

,
and you find that they are using more system quotas then than you think they should be, there could be other files on your system causing this error.

When a tar.gz file is extracting as root, the file ownership of it’s contents will then generally stay the same as they were on the system that compresses the tar.gz file.

This means that the user id number of the files will be extracting along with the files.  When you create your new user, his new user id may match the user id of the files that were extracting, so the system quotas will assume that the new user owns these other files thus adding large amounts of disk usage to the new user.

To resolve this problem, you will have to find these other files and chow them to another user (or root) after that the new user does not absorb the “cost” of their space.

So that, you can use the “find” program:

[root@server]# id username
uid=510(username) gid=510(username) groups=510(username)
[root@server]# find / -uid 510 | less

This code will tell you that userid of the new user, and then let you track down where the files are on the system.  (press space to scroll).

Replace the 510 sample with the actual UID number returns by the system.

Once you find the files that should not belong to the new user, then cd to that directory and “chown root *” these files (depending on which files they are) so that they no longer belong to the user.

You should be able to type

quota -v username

To see the current disk usage for that user.  If it is not correct with the new settings, you will need to update the system quotas:
RedHat

/sbin/quotaoff -a; /sbin/quotacheck -augm; /sbin/quotaon -a;

FreeBSD:

/usr/sbin/quotaoff -a; /sbin/quotacheck -aug; /usr/sbin/quotaon -a;

Once the quota system catches that, you can run the tally to update his stats.

echo “action=tally&value=all” >> /usr/local/directadmin/data/task.queue


Because the above find command may be slow, you can either do a quick comparison with the contents of the User’s home folder, eg:

cd /home
du username | sort -n
du -sh username

]]>
http://wiki.shopingserver.com/100-meg-of-space-and-nothing-has-been-added-yet/feed/ 0
Tips for fixing common problems….-Updating your DirectAdmin License manually http://wiki.shopingserver.com/updating-your-directadmin-license-manually-common/ http://wiki.shopingserver.com/updating-your-directadmin-license-manually-common/#respond Fri, 17 Apr 2020 17:45:47 +0000 http://wiki.shopingserver.com/?p=27332 Tips for fixing common problems….-Updating your DirectAdmin License manually — If you need to update your DirectAdmin license manually,

common problems….You can either do so by entering your information, then run the following commands:
Client ID (uid):  
License ID (lid): 
IP address:       

cd /usr/local/directadmin/scripts
./getLicense.sh 123 1234
service directadmin restart

Where 123 and 1234 are your Client ID and License ID, respectively.

If there are errors extracting the update.tar.gz file, then run:
head -n 1 /usr/local/directadmin/conf/license.key

To search for an error.

If there is an readable error inside the file, double check the IP you are using matches the IP in the license on our system.

Even though check that it is active in our clients section.

Failing that, you will need to contact sales@directadmin.com to get your license activated or updated.

If there you have multiple IPs on your device and wget is binding to the incorrect one, you can specify the IP to bind to by adding it as the last argument:

cd /usr/local/directadmin/scripts
./getLicense.sh 123 1234 1.2.3.4
service directadmin restart

If there you are not able to connect to port 443 on directadmin.com (https), or are not getting any results (no returned data), it may be a block somewhere on 443.

For that case, you can try using port 80 to get the license.

To do this, Now type:

echo 1 > /root/.insecure_download

and the scripts will automatically download over port 80, without any encryption.


If there you get errors during the restart, eg:

Stopping DirectAdmin: [ FAILED ]
Starting DirectAdmin: [ OK ]

your PID file may be out of sync. In this case, restart directadmin forcefully:

killall -9 directadmin
/etc/init.d/directadmin start

Retry the restart command, and ensure that both the “Stopping” and “Starting” sections are “[ OK ]”.

July 16, 2013: New license relay server

If there you can not connect to www.directadmin.com via any means, a new script has been added to let you get the license via a license relay server.

More information and fallback automation will come on time, but for now, manually running this from your server will work:

cd /usr/local/directadmin/conf
cp -f license.key license.key.old
wget -O license.key –no-check-certificate ‘https://license.directadmin.com/licenseupdate.php?uid=123&lid=1234
chown diradmin:diradmin license.key
chmod 600 license.key

You must then connect from your server using the correct IP address.

Use this –bind-address=1.2.3.4 option if needed, to force the correct IP.


Common related error messages:

*** An error has occurred while trying to update the license file ***

]]>
http://wiki.shopingserver.com/updating-your-directadmin-license-manually-common/feed/ 0