Recently, I had to rebuild a tikiwiki server (on a Linux machine) with only a mysql database backup image. I quickly found that the backup image of a tikiwiki does not contain the version of the tikiwiki software, which is very necessary; otherwise, the database schema won’t match. Fortunately, I managed to find that the tikiwiki version was 1.8.5 from some old notes.
Here is the resulting software stack after I finished.
- Red Hat Enterprise Linux AS Release 4
- mySQL Server 4.1.20
- Apache HTTP Server 2.0.52
- PHP 4.3.9
- Tikiwiki 1.8.5 Polaris
Here’s how I went about restoring the tikiwiki (assuming that the machine already has Redhat AS4 installed):
- Install PHP, HTTP Daemon (httpd), and supporting libraries:yum list | grep -i php
yum install php.i386 - Install mySQL server (mysqld) and supporting libraries:yum list | grep -i mysql
yum install mysql-server.i386 - Install mySQL client and the PHP-mySQL libraries:yum list | grep -i php-mysql
yum install php-mysql.i386 - Start both mysqld and httpd and configure them to start on reboot:chkconfig mysqld on
service mysqld start
chkconfig httpd on
service httpd start - Configure mysqld and setup database:(Set mySQL root password)
mysqladmin -u root password 'mypassword'
(Create a database)
mysqladmin -u root -p create mydatabase
(Login as mySQL root user)
mysql -u root -p
(Use main mySQL database)
mysql> use mysql;
(Give localhost permission to access all databases)
mysql> insert into host(host, db, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv) values('localhost', '%', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
(Create a user)
mysql> insert into user (host, user, password) values('localhost', 'myuser', password('mypassword'));
(Give that user access to the created database from localhost)
mysql> insert into db (host, db, user, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv) values ('localhost', 'mydatabase', 'myuser', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
(Quit from mySQL)
mysql> quit;
(Reload mySQL server)
mysqladmin -u root -p reload - Reload the HTTP Server just in case:service httpd reload
- Make sure that PHP is working by copying this testphp.php file to “/var/www/html” and browsing to “http://localhost/testphp.php”:<html>
<head>
<title>PHP Info Script</title>
</head>
<body>
<?php
phpinfo();
?>
</body>
</html> - Make sure that PHP-mySQL is working by copying this testmysql.php file to “/var/www/html”, replacing the text ”mysql_root_password” with your real password, and browsing to “http://localhost/testmysql.php”:<html>
<title>mySQL Test Script</title>
<body>
<?php
// connect and select a database
$link = mysql_connect("localhost:3306", "root", "mysql_root_password")
or die ("Couldn't connect: Check to make sure that:<br>" .
"<ul><li>your MySQL server is running</li>" .
"<li>you used the correct hostname (<tt>vergil/ovid</tt>)</li>" .
"<li>you added a colon with your port number after the hostname</li>" .
"<li>you used the username 'root'</li>" .
"<li>you used the correct root password</li>" .
"<li>you didn't forget to close a set of quotation marks</li><br><br>");
print "Connected successfully.<br>";
$db = "mysql";
mysql_select_db($db) or die("Could not select the database '" . $db . "'. Are you sure it exists?");
// perform an SQL query
$query = "SELECT * FROM user";
$result = mysql_query($query) or die("Query failed");
// print the result of the first row (row counting starts at zero)
printf("Host: %s<br>\n", mysql_result($result, 0, "Host"));
printf("User: %s<br>\n", mysql_result($result, 0, "User"));
printf("Grant privilege: %s<br>\n", mysql_result($result, 0, "Grant_priv"));
// free result set
mysql_free_result($result);
// close the connection
mysql_close($link);
?>
</body>
</html> - Unzip the tikiwiki 1.8.5 archive to the “/var/www/html” directory and run the setup script:chmod u+x setup.sh
./setup.sh
chmod u-x setup.sh - Configure the tikiwiki by browsing to ”http://localhost/tiki-install.php” and inputting the tikiwiki database name, user, and password.
- Restore the database from the backup image:mysql -u root -p
mysql> use tikiwiki;
mysql> source tiki_backup.sql - And we are done!
Some info above was provided by Linux Help – mySQL setup Guide.
Another essential history, "Why Vietnam," was authored by the late Major Archimedes L.A. Patti, who was parachuted into Japanese occupied Vietnam by the O.S.S., the C.I.A.'s predecessor, to support Ho, General Giap and the Viet Minh in the recovery of downed U,S, airmen during World War II. Major Patti delved into the competing post war powers, from the British and the French, to the Nationalist Chinese and others, all of whom had an essential interest in the suppression of an independent nationalist Vietnam.
It's not that some US policymakers didn't have a sophisticated view of the heterogeneous nature of the Vietminh side and it's key players--they did--nor were they delusional about the chances of their so-called 'nationalist' allies under the puppet emperor Bao Dai. Rather, they were quite clear on this. But it was the demands of the broader Communist threat to US global power that coloured US policy and their tolerance for Ho's Communist habit. As for Ho's nationalism, the US view of Third World regimes and their use of the term 'nationalist' was typically coterminus with whatever group was most pro-Western--those not fitting the suit were derided as either neutralist (perjorative) or down-right commies. The imperative was to hold the line--not to search out shades or orange in a sea of red.
The number one bit of advice from Lawrence: Never engage in a fight you aren't going to win!
The fact that the Soviets questioned Ho's communist credentials counts for nothing in regards to the question of whether Ho really was communist. The Soviets questioned the sincerity of anyone (Ho, Mao, Tito, Enver Hoxha, etc., etc.) who wasn't totally subservient to the Soviet party line and willing to sacrifice their people's interests to the needs of Soviet realpolitik.
Accordingly, Ho was both a lifelong communist and a Vietnamese nationalist who saw communism as the path to national liberation for the Vietnamese people, particularly after reading Lenin's work on the national question in 1920.
We continue to savage ourselves with ideological 'economic system' labels. Once these set into concrete, religiosity and rigidity lead people go to war (cold or hot) over whose version of 'truth' is to be followed. One of the most common arguments against the Vietnam Conflict (undeclared war) was always the economic 'ism' labels thrown around like leaves in the wind to make some rationale for initiating and then continuing the killing.
Having said that however the actual threats to human rights of life liberty, and all the "pursuits of happiness" and the entanglements of these ideologies did then and continue to play out here in the early 21st century.
The US history of supporting any and every military dictatorship in the developing world back then caused immediate blowback, and various ticking time bombs were set. Most all of them have exploded in our face, just as did Vietnam and now in the Arab regimes.
All this leads us back to present day America, in which the distribution of wealth and power are once again about to drastically unbalance.
There's no guarantee that, had Truman replied to Ho's telegram, and had the French given up Indochina, that we wouldn't have been sucked into some kind of bloody fight to establish a march in Vietnam against the newly Red China.
International relations are always a massively-multi-variant equation with no set standards for even recognizing a solution, were there one.
By an even longer perspective, empires always have a problem hanging on to mountainous kingdoms out on the fringes. The Balkans, the Caucasus, Vietnam, Tibet, the Atlas Mountains, all object lessons.
As my friend John Yohalem says, "Those who do not learn history are condemned to think it's repeating itself."
fought on the wrong side then. The mindset of our leadership-in-charge then
was called the military-industrial complex, and today is more aptly called the 'neocons' . More sadly, this same mindset has created the broad scale 'war on terror' instead of the more accurate picture of 'the law enforcement hunt for the leadership of politically motivated disaffected people'.
the US really blundered in the 1950s and 1960s, lumping vietnam with china, n. korea and the soviet union under the banner of 'communism', which was never the same across countries and even across time within the same country. like any country, vietnam was never perfect, but at least it did not have a mao zedong, a kim il-sung, a josef stalin or a pol pot (also not a ferdinand marcos, a park jung hee nor a sukarno).
but hindsight is 20/20.
Didn't Ho work fro a while in the Bronx? Perhaps that reinforced his Marxist views, since a large portion of the US Communist Party lived in the Bronx at that time. I remember some fellow Bronxites proudly showing me their CPUSA cards. Yes, they had cards.